home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / libx11 / include / x11 / xlib.h < prev    next >
C/C++ Source or Header  |  1999-01-01  |  101KB  |  4,346 lines

  1. /* $XConsortium: Xlib.h,v 11.215 91/07/22 15:42:38 rws Exp $ */
  2. /* 
  3.  * Copyright 1985, 1986, 1987, 1991 by the Massachusetts Institute of Technology
  4.  *
  5.  * Permission to use, copy, modify, and distribute this software and its
  6.  * documentation for any purpose and without fee is hereby granted, provided 
  7.  * that the above copyright notice appear in all copies and that both that 
  8.  * copyright notice and this permission notice appear in supporting 
  9.  * documentation, and that the name of M.I.T. not be used in advertising
  10.  * or publicity pertaining to distribution of the software without specific, 
  11.  * written prior permission. M.I.T. makes no representations about the 
  12.  * suitability of this software for any purpose.  It is provided "as is"
  13.  * without express or implied warranty.
  14.  *
  15.  * X Window System is a Trademark of MIT.
  16.  *
  17.  */
  18.  
  19.  
  20. /*
  21.  *    Xlib.h - Header definition and support file for the C subroutine
  22.  *    interface library (Xlib) to the X Window System Protocol (V11).
  23.  *    Structures and symbols starting with "_" are private to the library.
  24.  */
  25. #ifndef _XLIB_H_
  26. #define _XLIB_H_
  27.  
  28. #define XlibSpecificationRelease 5
  29.  
  30. #define strncasecmp strnicmp
  31. #define strcasecmp stricmp
  32.  
  33. #ifdef USG
  34. #ifndef __TYPES__
  35. #include <sys/types.h>            /* forgot to protect it... */
  36. #define __TYPES__
  37. #endif /* __TYPES__ */
  38. #else
  39. #if defined(_POSIX_SOURCE) && defined(MOTOROLA)
  40. #undef _POSIX_SOURCE
  41. #include <sys/types.h>
  42. #define _POSIX_SOURCE
  43. #else
  44. #include <sys/types.h>
  45. #endif
  46. #endif /* USG */
  47.  
  48. #include <X11/X.h>
  49.  
  50. /* applications should not depend on these two headers being included! */
  51. #include <X11/Xfuncproto.h>
  52. #include <X11/Xosdefs.h>
  53.  
  54. #ifndef X_WCHAR
  55. #ifdef X_NOT_STDC_ENV
  56. #define X_WCHAR
  57. #endif
  58. #endif
  59.  
  60. #ifndef X_WCHAR
  61. #include <stddef.h>
  62. #else
  63. /* replace this with #include or typedef appropriate for your system */
  64. typedef unsigned long wchar_t;
  65. #endif
  66.  
  67. typedef char *XPointer;
  68.  
  69. #ifdef AMIGA
  70. #include <exec/types.h>
  71. #include <devices/timer.h>
  72. /*
  73. #define tv_sec tv_secs
  74. #define tv_usec tv_micro
  75. */
  76. #endif
  77.  
  78. #define Bool int
  79. #define Status int
  80. #define True 1
  81. #define False 0
  82.  
  83. #define QueuedAlready 0
  84. #define QueuedAfterReading 1
  85. #define QueuedAfterFlush 2
  86.  
  87. #define ConnectionNumber(dpy)     ((dpy)->fd)
  88. #define RootWindow(dpy, scr)     (((dpy)->screens[(scr)]).root)
  89. #define DefaultScreen(dpy)     ((dpy)->default_screen)
  90. #define DefaultRootWindow(dpy)     (((dpy)->screens[(dpy)->default_screen]).root)
  91. #define DefaultVisual(dpy, scr) (((dpy)->screens[(scr)]).root_visual)
  92. #define DefaultGC(dpy, scr)     (((dpy)->screens[(scr)]).default_gc)
  93. #define BlackPixel(dpy, scr)     (((dpy)->screens[(scr)]).black_pixel)
  94. #define WhitePixel(dpy, scr)     (((dpy)->screens[(scr)]).white_pixel)
  95. #define AllPlanes         ((unsigned long)~0L)
  96. #define QLength(dpy)         ((dpy)->qlen)
  97. #define DisplayWidth(dpy, scr)     (((dpy)->screens[(scr)]).width)
  98. #define DisplayHeight(dpy, scr) (((dpy)->screens[(scr)]).height)
  99. #define DisplayWidthMM(dpy, scr)(((dpy)->screens[(scr)]).mwidth)
  100. #define DisplayHeightMM(dpy, scr)(((dpy)->screens[(scr)]).mheight)
  101. #define DisplayPlanes(dpy, scr) (((dpy)->screens[(scr)]).root_depth)
  102. #define DisplayCells(dpy, scr)     (DefaultVisual((dpy), (scr))->map_entries)
  103. #define ScreenCount(dpy)     ((dpy)->nscreens)
  104. #define ServerVendor(dpy)     ((dpy)->vendor)
  105. #define ProtocolVersion(dpy)     ((dpy)->proto_major_version)
  106. #define ProtocolRevision(dpy)     ((dpy)->proto_minor_version)
  107. #define VendorRelease(dpy)     ((dpy)->release)
  108. #define DisplayString(dpy)     ((dpy)->display_name)
  109. #define DefaultDepth(dpy, scr)     (((dpy)->screens[(scr)]).root_depth)
  110. #define DefaultColormap(dpy, scr)(((dpy)->screens[(scr)]).cmap)
  111. #define BitmapUnit(dpy)     ((dpy)->bitmap_unit)
  112. #define BitmapBitOrder(dpy)     ((dpy)->bitmap_bit_order)
  113. #define BitmapPad(dpy)         ((dpy)->bitmap_pad)
  114. #define ImageByteOrder(dpy)     ((dpy)->byte_order)
  115. #define NextRequest(dpy)    ((dpy)->request + 1)
  116. #define LastKnownRequestProcessed(dpy)    ((dpy)->last_request_read)
  117.  
  118. /* macros for screen oriented applications (toolkit) */
  119. #define ScreenOfDisplay(dpy, scr)(&((dpy)->screens[(scr)]))
  120. #define DefaultScreenOfDisplay(dpy) (&((dpy)->screens[(dpy)->default_screen]))
  121. #define DisplayOfScreen(s)    ((s)->display)
  122. #define RootWindowOfScreen(s)    ((s)->root)
  123. #define BlackPixelOfScreen(s)    ((s)->black_pixel)
  124. #define WhitePixelOfScreen(s)    ((s)->white_pixel)
  125. #define DefaultColormapOfScreen(s)((s)->cmap)
  126. #define DefaultDepthOfScreen(s)    ((s)->root_depth)
  127. #define DefaultGCOfScreen(s)    ((s)->default_gc)
  128. #define DefaultVisualOfScreen(s)((s)->root_visual)
  129. #define WidthOfScreen(s)    ((s)->width)
  130. #define HeightOfScreen(s)    ((s)->height)
  131. #define WidthMMOfScreen(s)    ((s)->mwidth)
  132. #define HeightMMOfScreen(s)    ((s)->mheight)
  133. #define PlanesOfScreen(s)    ((s)->root_depth)
  134. #define CellsOfScreen(s)    (DefaultVisualOfScreen((s))->map_entries)
  135. #define MinCmapsOfScreen(s)    ((s)->min_maps)
  136. #define MaxCmapsOfScreen(s)    ((s)->max_maps)
  137. #define DoesSaveUnders(s)    ((s)->save_unders)
  138. #define DoesBackingStore(s)    ((s)->backing_store)
  139. #define EventMaskOfScreen(s)    ((s)->root_input_mask)
  140.  
  141. /*
  142.  * Extensions need a way to hang private data on some structures.
  143.  */
  144. typedef struct _XExtData {
  145.     int number;        /* number returned by XRegisterExtension */
  146.     struct _XExtData *next;    /* next item on list of data for structure */
  147.     int (*free_private)();    /* called to free private storage */
  148.     XPointer private_data;    /* data private to this extension. */
  149. } XExtData;
  150.  
  151. /*
  152.  * This file contains structures used by the extension mechanism.
  153.  */
  154. typedef struct {        /* public to extension, cannot be changed */
  155.     int extension;        /* extension number */
  156.     int major_opcode;    /* major op-code assigned by server */
  157.     int first_event;    /* first event number for the extension */
  158.     int first_error;    /* first error number for the extension */
  159. } XExtCodes;
  160.  
  161. /*
  162.  * Data structure for retrieving info about pixmap formats.
  163.  */
  164.  
  165. typedef struct {
  166.     int depth;
  167.     int bits_per_pixel;
  168.     int scanline_pad;
  169. } XPixmapFormatValues;
  170.  
  171.  
  172. /*
  173.  * Data structure for setting graphics context.
  174.  */
  175. typedef struct {
  176.     int function;        /* logical operation */
  177.     unsigned long plane_mask;/* plane mask */
  178.     unsigned long foreground;/* foreground pixel */
  179.     unsigned long background;/* background pixel */
  180.     int line_width;        /* line width */
  181.     int line_style;         /* LineSolid, LineOnOffDash, LineDoubleDash */
  182.     int cap_style;          /* CapNotLast, CapButt, 
  183.                    CapRound, CapProjecting */
  184.     int join_style;         /* JoinMiter, JoinRound, JoinBevel */
  185.     int fill_style;         /* FillSolid, FillTiled, 
  186.                    FillStippled, FillOpaeueStippled */
  187.     int fill_rule;          /* EvenOddRule, WindingRule */
  188.     int arc_mode;        /* ArcChord, ArcPieSlice */
  189.     Pixmap tile;        /* tile pixmap for tiling operations */
  190.     Pixmap stipple;        /* stipple 1 plane pixmap for stipping */
  191.     int ts_x_origin;    /* offset for tile or stipple operations */
  192.     int ts_y_origin;
  193.         Font font;            /* default text font for text operations */
  194.     int subwindow_mode;     /* ClipByChildren, IncludeInferiors */
  195.     Bool graphics_exposures;/* boolean, should exposures be generated */
  196.     int clip_x_origin;    /* origin for clipping */
  197.     int clip_y_origin;
  198.     Pixmap clip_mask;    /* bitmap clipping; other calls for rects */
  199.     int dash_offset;    /* patterned/dashed line information */
  200.     char dashes;
  201. } XGCValues;
  202.  
  203. /*
  204.  * Graphics context.  The contents of this structure are implementation
  205.  * dependent.  A GC should be treated as opaque by application code.
  206.  */
  207.  
  208. typedef struct _XGC {
  209.     XExtData *ext_data;    /* hook for extension to hang data */
  210.     GContext gid;    /* protocol ID for graphics context */
  211.     Bool rects;        /* boolean: TRUE if clipmask is list of rectangles */
  212.     Bool dashes;    /* boolean: TRUE if dash-list is really a list */
  213.     unsigned long dirty;/* cache dirty bits */
  214.     XGCValues values;    /* shadow structure of values */
  215. } *GC;
  216.  
  217.  
  218. /*
  219.  * Visual structure; contains information about colormapping possible.
  220.  */
  221. typedef struct {
  222.     XExtData *ext_data;    /* hook for extension to hang data */
  223.     VisualID visualid;    /* visual id of this visual */
  224. #if defined(__cplusplus) || defined(c_plusplus)
  225.     int c_class;        /* C++ class of screen (monochrome, etc.) */
  226. #else
  227.     int class;        /* class of screen (monochrome, etc.) */
  228. #endif
  229.     unsigned long red_mask, green_mask, blue_mask;    /* mask values */
  230.     int bits_per_rgb;    /* log base 2 of distinct color values */
  231.     int map_entries;    /* color map entries */
  232. } Visual;
  233.  
  234. /*
  235.  * Depth structure; contains information for each possible depth.
  236.  */    
  237. typedef struct {
  238.     int depth;        /* this depth (Z) of the depth */
  239.     int nvisuals;        /* number of Visual types at this depth */
  240.     Visual *visuals;    /* list of visuals possible at this depth */
  241. } Depth;
  242.  
  243. /*
  244.  * Information about the screen.  The contents of this structure are
  245.  * implementation dependent.  A Screen should be treated as opaque
  246.  * by application code.
  247.  */
  248. typedef struct {
  249.     XExtData *ext_data;    /* hook for extension to hang data */
  250.     struct _XDisplay *display;/* back pointer to display structure */
  251.     Window root;        /* Root window id. */
  252.     int width, height;    /* width and height of screen */
  253.     int mwidth, mheight;    /* width and height of  in millimeters */
  254.     int ndepths;        /* number of depths possible */
  255.     Depth *depths;        /* list of allowable depths on the screen */
  256.     int root_depth;        /* bits per pixel */
  257.     Visual *root_visual;    /* root visual */
  258.     GC default_gc;        /* GC for the root root visual */
  259.     Colormap cmap;        /* default color map */
  260.     unsigned long white_pixel;
  261.     unsigned long black_pixel;    /* White and Black pixel values */
  262.     int max_maps, min_maps;    /* max and min color maps */
  263.     int backing_store;    /* Never, WhenMapped, Always */
  264.     Bool save_unders;    
  265.     long root_input_mask;    /* initial root input mask */
  266. } Screen;
  267.  
  268. /*
  269.  * Format structure; describes ZFormat data the screen will understand.
  270.  */
  271. typedef struct {
  272.     XExtData *ext_data;    /* hook for extension to hang data */
  273.     int depth;        /* depth of this image format */
  274.     int bits_per_pixel;    /* bits/pixel at this depth */
  275.     int scanline_pad;    /* scanline must padded to this multiple */
  276. } ScreenFormat;
  277.  
  278. /*
  279.  * Data structure for setting window attributes.
  280.  */
  281. typedef struct {
  282.     Pixmap background_pixmap;    /* background or None or ParentRelative */
  283.     unsigned long background_pixel;    /* background pixel */
  284.     Pixmap border_pixmap;    /* border of the window */
  285.     unsigned long border_pixel;    /* border pixel value */
  286.     int bit_gravity;        /* one of bit gravity values */
  287.     int win_gravity;        /* one of the window gravity values */
  288.     int backing_store;        /* NotUseful, WhenMapped, Always */
  289.     unsigned long backing_planes;/* planes to be preseved if possible */
  290.     unsigned long backing_pixel;/* value to use in restoring planes */
  291.     Bool save_under;        /* should bits under be saved? (popups) */
  292.     long event_mask;        /* set of events that should be saved */
  293.     long do_not_propagate_mask;    /* set of events that should not propagate */
  294.     Bool override_redirect;    /* boolean value for override-redirect */
  295.     Colormap colormap;        /* color map to be associated with window */
  296.     Cursor cursor;        /* cursor to be displayed (or None) */
  297. } XSetWindowAttributes;
  298.  
  299. typedef struct {
  300.     int x, y;            /* location of window */
  301.     int width, height;        /* width and height of window */
  302.     int border_width;        /* border width of window */
  303.     int depth;              /* depth of window */
  304.     Visual *visual;        /* the associated visual structure */
  305.     Window root;            /* root of screen containing window */
  306. #if defined(__cplusplus) || defined(c_plusplus)
  307.     int c_class;        /* C++ InputOutput, InputOnly*/
  308. #else
  309.     int class;            /* InputOutput, InputOnly*/
  310. #endif
  311.     int bit_gravity;        /* one of bit gravity values */
  312.     int win_gravity;        /* one of the window gravity values */
  313.     int backing_store;        /* NotUseful, WhenMapped, Always */
  314.     unsigned long backing_planes;/* planes to be preserved if possible */
  315.     unsigned long backing_pixel;/* value to be used when restoring planes */
  316.     Bool save_under;        /* boolean, should bits under be saved? */
  317.     Colormap colormap;        /* color map to be associated with window */
  318.     Bool map_installed;        /* boolean, is color map currently installed*/
  319.     int map_state;        /* IsUnmapped, IsUnviewable, IsViewable */
  320.     long all_event_masks;    /* set of events all people have interest in*/
  321.     long your_event_mask;    /* my event mask */
  322.     long do_not_propagate_mask; /* set of events that should not propagate */
  323.     Bool override_redirect;    /* boolean value for override-redirect */
  324.     Screen *screen;        /* back pointer to correct screen */
  325. } XWindowAttributes;
  326.  
  327. /*
  328.  * Data structure for host setting; getting routines.
  329.  *
  330.  */
  331.  
  332. typedef struct {
  333.     int family;        /* for example FamilyInternet */
  334.     int length;        /* length of address, in bytes */
  335.     char *address;        /* pointer to where to find the bytes */
  336. } XHostAddress;
  337.  
  338. /*
  339.  * Data structure for "image" data, used by image manipulation routines.
  340.  */
  341. typedef struct _XImage {
  342.     int width, height;        /* size of image */
  343.     int xoffset;        /* number of pixels offset in X direction */
  344.     int format;            /* XYBitmap, XYPixmap, ZPixmap */
  345.     char *data;            /* pointer to image data */
  346.     int byte_order;        /* data byte order, LSBFirst, MSBFirst */
  347.     int bitmap_unit;        /* quant. of scanline 8, 16, 32 */
  348.     int bitmap_bit_order;    /* LSBFirst, MSBFirst */
  349.     int bitmap_pad;        /* 8, 16, 32 either XY or ZPixmap */
  350.     int depth;            /* depth of image */
  351.     int bytes_per_line;        /* accelarator to next line */
  352.     int bits_per_pixel;        /* bits per pixel (ZPixmap) */
  353.     unsigned long red_mask;    /* bits in z arrangment */
  354.     unsigned long green_mask;
  355.     unsigned long blue_mask;
  356.     XPointer obdata;        /* hook for the object routines to hang on */
  357.     struct funcs {        /* image manipulation routines */
  358.     struct _XImage *(*create_image)();
  359. #if NeedFunctionPrototypes
  360. #ifdef __cplusplus
  361.     int (* destroy_image)        (struct _XImage *);
  362. #else
  363.     int (* __stdargs destroy_image)        (struct _XImage *);
  364. #endif
  365.     unsigned long (*get_pixel)  (struct _XImage *, int, int);
  366.     int (*put_pixel)            (struct _XImage *, int, int, unsigned long);
  367.     struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
  368.     int (*add_pixel)            (struct _XImage *, long);
  369. #else
  370.     int (* destroy_image)();
  371.     unsigned long (*get_pixel)();
  372.     int (*put_pixel)();
  373.     struct _XImage *(*sub_image)();
  374.     int (*add_pixel)();
  375. #endif
  376.     } f;
  377. } XImage;
  378.  
  379. /* 
  380.  * Data structure for XReconfigureWindow
  381.  */
  382. typedef struct {
  383.     int x, y;
  384.     int width, height;
  385.     int border_width;
  386.     Window sibling;
  387.     int stack_mode;
  388. } XWindowChanges;
  389.  
  390. /*
  391.  * Data structure used by color operations
  392.  */
  393. typedef struct {
  394.     unsigned long pixel;
  395.     unsigned short red, green, blue;
  396.     char flags;  /* do_red, do_green, do_blue */
  397.     char pad;
  398. } XColor;
  399.  
  400. /* 
  401.  * Data structures for graphics operations.  On most machines, these are
  402.  * congruent with the wire protocol structures, so reformatting the data
  403.  * can be avoided on these architectures.
  404.  */
  405. typedef struct {
  406.     short x1, y1, x2, y2;
  407. } XSegment;
  408.  
  409. typedef struct {
  410.     short x, y;
  411. } XPoint;
  412.     
  413. typedef struct {
  414.     short x, y;
  415.     unsigned short width, height;
  416. } XRectangle;
  417.     
  418. typedef struct {
  419.     short x, y;
  420.     unsigned short width, height;
  421.     short angle1, angle2;
  422. } XArc;
  423.  
  424.  
  425. /* Data structure for XChangeKeyboardControl */
  426.  
  427. typedef struct {
  428.         int key_click_percent;
  429.         int bell_percent;
  430.         int bell_pitch;
  431.         int bell_duration;
  432.         int led;
  433.         int led_mode;
  434.         int key;
  435.         int auto_repeat_mode;   /* On, Off, Default */
  436. } XKeyboardControl;
  437.  
  438. /* Data structure for XGetKeyboardControl */
  439.  
  440. typedef struct {
  441.         int key_click_percent;
  442.     int bell_percent;
  443.     unsigned int bell_pitch, bell_duration;
  444.     unsigned long led_mask;
  445.     int global_auto_repeat;
  446.     char auto_repeats[32];
  447. } XKeyboardState;
  448.  
  449. /* Data structure for XGetMotionEvents.  */
  450.  
  451. typedef struct {
  452.         Time time;
  453.     short x, y;
  454. } XTimeCoord;
  455.  
  456. /* Data structure for X{Set,Get}ModifierMapping */
  457.  
  458. typedef struct {
  459.      int max_keypermod;    /* The server's max # of keys per modifier */
  460.      KeyCode *modifiermap;    /* An 8 by max_keypermod array of modifiers */
  461. } XModifierKeymap;
  462.  
  463. /*
  464.  * Display datatype maintaining display specific data.
  465.  * The contents of this structure are implementation dependent.
  466.  * A Display should be treated as opaque by application code.
  467.  */
  468. typedef struct _XDisplay {
  469.     XExtData *ext_data;    /* hook for extension to hang data */
  470.     struct _XFreeFuncs *free_funcs; /* internal free functions */
  471.     int fd;            /* Network socket. */
  472.     int lock;        /* is someone in critical section? */
  473.     int proto_major_version;/* maj. version of server's X protocol */
  474.     int proto_minor_version;/* minor version of servers X protocol */
  475.     char *vendor;        /* vendor of the server hardware */
  476.         XID resource_base;    /* resource ID base */
  477.     XID resource_mask;    /* resource ID mask bits */
  478.     XID resource_id;    /* allocator current ID */
  479.     int resource_shift;    /* allocator shift to correct bits */
  480.     XID (*resource_alloc)(); /* allocator function */
  481.     int byte_order;        /* screen byte order, LSBFirst, MSBFirst */
  482.     int bitmap_unit;    /* padding and data requirements */
  483.     int bitmap_pad;        /* padding requirements on bitmaps */
  484.     int bitmap_bit_order;    /* LeastSignificant or MostSignificant */
  485.     int nformats;        /* number of pixmap formats in list */
  486.     ScreenFormat *pixmap_format;    /* pixmap format list */
  487.     int vnumber;        /* Xlib's X protocol version number. */
  488.     int release;        /* release of the server */
  489.     struct _XSQEvent *head, *tail;    /* Input event queue. */
  490.     int qlen;        /* Length of input event queue */
  491.     unsigned long last_request_read; /* seq number of last event read */
  492.     unsigned long request;    /* sequence number of last request. */
  493.     char *last_req;        /* beginning of last request, or dummy */
  494.     char *buffer;        /* Output buffer starting address. */
  495.     char *bufptr;        /* Output buffer index pointer. */
  496.     char *bufmax;        /* Output buffer maximum+1 address. */
  497.     unsigned max_request_size; /* maximum number 32 bit words in request*/
  498.     struct _XrmHashBucketRec *db;
  499.     int (*synchandler)();    /* Synchronization handler */
  500.     char *display_name;    /* "host:display" string used on this connect*/
  501.     int default_screen;    /* default screen for operations */
  502.     int nscreens;        /* number of screens on this server*/
  503.     Screen *screens;    /* pointer to list of screens */
  504.     unsigned long motion_buffer;    /* size of motion buffer */
  505.     Window current;        /* for use internally for Keymap notify */
  506.     int min_keycode;    /* minimum defined keycode */
  507.     int max_keycode;    /* maximum defined keycode */
  508.     KeySym *keysyms;    /* This server's keysyms */
  509.     XModifierKeymap *modifiermap;    /* This server's modifier keymap */
  510.     int keysyms_per_keycode;/* number of rows */
  511.     char *xdefaults;    /* contents of defaults from server */
  512.     char *scratch_buffer;    /* place to hang scratch buffer */
  513.     unsigned long scratch_length;    /* length of scratch buffer */
  514.     int ext_number;        /* extension number on this display */
  515.     struct _XExten *ext_procs; /* extensions initialized on this display */
  516.     /*
  517.      * the following can be fixed size, as the protocol defines how
  518.      * much address space is available. 
  519.      * While this could be done using the extension vector, there
  520.      * may be MANY events processed, so a search through the extension
  521.      * list to find the right procedure for each event might be
  522.      * expensive if many extensions are being used.
  523.      */
  524.     Bool (*event_vec[128])();  /* vector for wire to event */
  525.     Status (*wire_vec[128])(); /* vector for event to wire */
  526.     KeySym lock_meaning;       /* for XLookupString */
  527.     struct _XKeytrans *key_bindings; /* for XLookupString */
  528.     Font cursor_font;       /* for XCreateFontCursor */
  529.     struct _XDisplayAtoms *atoms; /* for XInternAtom */
  530.     struct {           /* for XReconfigureWMWindow */
  531.         long sequence_number;
  532.         int (*old_handler)();
  533.         Bool succeeded;
  534.     } reconfigure_wm_window;
  535.     unsigned long flags;       /* internal connection flags */
  536.     unsigned int mode_switch;  /* keyboard group modifiers */
  537.     struct _XContextDB *context_db; /* context database */
  538.     Bool (**error_vec)();      /* vector for wire to error */
  539.     /*
  540.      * Xcms information
  541.      */
  542.     struct {
  543.        XPointer defaultCCCs;  /* pointer to an array of default XcmsCCC */
  544.        XPointer clientCmaps;  /* pointer to linked list of XcmsCmapRec */
  545.        XPointer perVisualIntensityMaps;
  546.                   /* linked list of XcmsIntensityMap */
  547.     } cms;
  548.     int conn_checker;         /* ugly thing used by _XEventsQueued */
  549.     struct _XIMFilter *im_filters;
  550. } Display;
  551.  
  552. #if NeedFunctionPrototypes    /* prototypes require event type definitions */
  553. #undef _XEVENT_
  554. #endif
  555. #ifndef _XEVENT_
  556. /*
  557.  * Definitions of specific events.
  558.  */
  559. typedef struct {
  560.     int type;        /* of event */
  561.     unsigned long serial;    /* # of last request processed by server */
  562.     Bool send_event;    /* true if this came from a SendEvent request */
  563.     Display *display;    /* Display the event was read from */
  564.     Window window;            /* "event" window it is reported relative to */
  565.     Window root;            /* root window that the event occured on */
  566.     Window subwindow;    /* child window */
  567.     Time time;        /* milliseconds */
  568.     int x, y;        /* pointer x, y coordinates in event window */
  569.     int x_root, y_root;    /* coordinates relative to root */
  570.     unsigned int state;    /* key or button mask */
  571.     unsigned int keycode;    /* detail */
  572.     Bool same_screen;    /* same screen flag */
  573. } XKeyEvent;
  574. typedef XKeyEvent XKeyPressedEvent;
  575. typedef XKeyEvent XKeyReleasedEvent;
  576.  
  577. typedef struct {
  578.     int type;        /* of event */
  579.     unsigned long serial;    /* # of last request processed by server */
  580.     Bool send_event;    /* true if this came from a SendEvent request */
  581.     Display *display;    /* Display the event was read from */
  582.     Window window;            /* "event" window it is reported relative to */
  583.     Window root;            /* root window that the event occured on */
  584.     Window subwindow;    /* child window */
  585.     Time time;        /* milliseconds */
  586.     int x, y;        /* pointer x, y coordinates in event window */
  587.     int x_root, y_root;    /* coordinates relative to root */
  588.     unsigned int state;    /* key or button mask */
  589.     unsigned int button;    /* detail */
  590.     Bool same_screen;    /* same screen flag */
  591. } XButtonEvent;
  592. typedef XButtonEvent XButtonPressedEvent;
  593. typedef XButtonEvent XButtonReleasedEvent;
  594.  
  595. typedef struct {
  596.     int type;        /* of event */
  597.     unsigned long serial;    /* # of last request processed by server */
  598.     Bool send_event;    /* true if this came from a SendEvent request */
  599.     Display *display;    /* Display the event was read from */
  600.     Window window;            /* "event" window reported relative to */
  601.     Window root;            /* root window that the event occured on */
  602.     Window subwindow;    /* child window */
  603.     Time time;        /* milliseconds */
  604.     int x, y;        /* pointer x, y coordinates in event window */
  605.     int x_root, y_root;    /* coordinates relative to root */
  606.     unsigned int state;    /* key or button mask */
  607.     char is_hint;        /* detail */
  608.     Bool same_screen;    /* same screen flag */
  609. } XMotionEvent;
  610. typedef XMotionEvent XPointerMovedEvent;
  611.  
  612. typedef struct {
  613.     int type;        /* of event */
  614.     unsigned long serial;    /* # of last request processed by server */
  615.     Bool send_event;    /* true if this came from a SendEvent request */
  616.     Display *display;    /* Display the event was read from */
  617.     Window window;            /* "event" window reported relative to */
  618.     Window root;            /* root window that the event occured on */
  619.     Window subwindow;    /* child window */
  620.     Time time;        /* milliseconds */
  621.     int x, y;        /* pointer x, y coordinates in event window */
  622.     int x_root, y_root;    /* coordinates relative to root */
  623.     int mode;        /* NotifyNormal, NotifyGrab, NotifyUngrab */
  624.     int detail;
  625.     /*
  626.      * NotifyAncestor, NotifyVirtual, NotifyInferior, 
  627.      * NotifyNonlinear,NotifyNonlinearVirtual
  628.      */
  629.     Bool same_screen;    /* same screen flag */
  630.     Bool focus;        /* boolean focus */
  631.     unsigned int state;    /* key or button mask */
  632. } XCrossingEvent;
  633. typedef XCrossingEvent XEnterWindowEvent;
  634. typedef XCrossingEvent XLeaveWindowEvent;
  635.  
  636. typedef struct {
  637.     int type;        /* FocusIn or FocusOut */
  638.     unsigned long serial;    /* # of last request processed by server */
  639.     Bool send_event;    /* true if this came from a SendEvent request */
  640.     Display *display;    /* Display the event was read from */
  641.     Window window;        /* window of event */
  642.     int mode;        /* NotifyNormal, NotifyGrab, NotifyUngrab */
  643.     int detail;
  644.     /*
  645.      * NotifyAncestor, NotifyVirtual, NotifyInferior, 
  646.      * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
  647.      * NotifyPointerRoot, NotifyDetailNone 
  648.      */
  649. } XFocusChangeEvent;
  650. typedef XFocusChangeEvent XFocusInEvent;
  651. typedef XFocusChangeEvent XFocusOutEvent;
  652.  
  653. /* generated on EnterWindow and FocusIn  when KeyMapState selected */
  654. typedef struct {
  655.     int type;
  656.     unsigned long serial;    /* # of last request processed by server */
  657.     Bool send_event;    /* true if this came from a SendEvent request */
  658.     Display *display;    /* Display the event was read from */
  659.     Window window;
  660.     char key_vector[32];
  661. } XKeymapEvent;    
  662.  
  663. typedef struct {
  664.     int type;
  665.     unsigned long serial;    /* # of last request processed by server */
  666.     Bool send_event;    /* true if this came from a SendEvent request */
  667.     Display *display;    /* Display the event was read from */
  668.     Window window;
  669.     int x, y;
  670.     int width, height;
  671.     int count;        /* if non-zero, at least this many more */
  672. } XExposeEvent;
  673.  
  674. typedef struct {
  675.     int type;
  676.     unsigned long serial;    /* # of last request processed by server */
  677.     Bool send_event;    /* true if this came from a SendEvent request */
  678.     Display *display;    /* Display the event was read from */
  679.     Drawable drawable;
  680.     int x, y;
  681.     int width, height;
  682.     int count;        /* if non-zero, at least this many more */
  683.     int major_code;        /* core is CopyArea or CopyPlane */
  684.     int minor_code;        /* not defined in the core */
  685. } XGraphicsExposeEvent;
  686.  
  687. typedef struct {
  688.     int type;
  689.     unsigned long serial;    /* # of last request processed by server */
  690.     Bool send_event;    /* true if this came from a SendEvent request */
  691.     Display *display;    /* Display the event was read from */
  692.     Drawable drawable;
  693.     int major_code;        /* core is CopyArea or CopyPlane */
  694.     int minor_code;        /* not defined in the core */
  695. } XNoExposeEvent;
  696.  
  697. typedef struct {
  698.     int type;
  699.     unsigned long serial;    /* # of last request processed by server */
  700.     Bool send_event;    /* true if this came from a SendEvent request */
  701.     Display *display;    /* Display the event was read from */
  702.     Window window;
  703.     int state;        /* Visibility state */
  704. } XVisibilityEvent;
  705.  
  706. typedef struct {
  707.     int type;
  708.     unsigned long serial;    /* # of last request processed by server */
  709.     Bool send_event;    /* true if this came from a SendEvent request */
  710.     Display *display;    /* Display the event was read from */
  711.     Window parent;        /* parent of the window */
  712.     Window window;        /* window id of window created */
  713.     int x, y;        /* window location */
  714.     int width, height;    /* size of window */
  715.     int border_width;    /* border width */
  716.     Bool override_redirect;    /* creation should be overridden */
  717. } XCreateWindowEvent;
  718.  
  719. typedef struct {
  720.     int type;
  721.     unsigned long serial;    /* # of last request processed by server */
  722.     Bool send_event;    /* true if this came from a SendEvent request */
  723.     Display *display;    /* Display the event was read from */
  724.     Window event;
  725.     Window window;
  726. } XDestroyWindowEvent;
  727.  
  728. typedef struct {
  729.     int type;
  730.     unsigned long serial;    /* # of last request processed by server */
  731.     Bool send_event;    /* true if this came from a SendEvent request */
  732.     Display *display;    /* Display the event was read from */
  733.     Window event;
  734.     Window window;
  735.     Bool from_configure;
  736. } XUnmapEvent;
  737.  
  738. typedef struct {
  739.     int type;
  740.     unsigned long serial;    /* # of last request processed by server */
  741.     Bool send_event;    /* true if this came from a SendEvent request */
  742.     Display *display;    /* Display the event was read from */
  743.     Window event;
  744.     Window window;
  745.     Bool override_redirect;    /* boolean, is override set... */
  746. } XMapEvent;
  747.  
  748. typedef struct {
  749.     int type;
  750.     unsigned long serial;    /* # of last request processed by server */
  751.     Bool send_event;    /* true if this came from a SendEvent request */
  752.     Display *display;    /* Display the event was read from */
  753.     Window parent;
  754.     Window window;
  755. } XMapRequestEvent;
  756.  
  757. typedef struct {
  758.     int type;
  759.     unsigned long serial;    /* # of last request processed by server */
  760.     Bool send_event;    /* true if this came from a SendEvent request */
  761.     Display *display;    /* Display the event was read from */
  762.     Window event;
  763.     Window window;
  764.     Window parent;
  765.     int x, y;
  766.     Bool override_redirect;
  767. } XReparentEvent;
  768.  
  769. typedef struct {
  770.     int type;
  771.     unsigned long serial;    /* # of last request processed by server */
  772.     Bool send_event;    /* true if this came from a SendEvent request */
  773.     Display *display;    /* Display the event was read from */
  774.     Window event;
  775.     Window window;
  776.     int x, y;
  777.     int width, height;
  778.     int border_width;
  779.     Window above;
  780.     Bool override_redirect;
  781. } XConfigureEvent;
  782.  
  783. typedef struct {
  784.     int type;
  785.     unsigned long serial;    /* # of last request processed by server */
  786.     Bool send_event;    /* true if this came from a SendEvent request */
  787.     Display *display;    /* Display the event was read from */
  788.     Window event;
  789.     Window window;
  790.     int x, y;
  791. } XGravityEvent;
  792.  
  793. typedef struct {
  794.     int type;
  795.     unsigned long serial;    /* # of last request processed by server */
  796.     Bool send_event;    /* true if this came from a SendEvent request */
  797.     Display *display;    /* Display the event was read from */
  798.     Window window;
  799.     int width, height;
  800. } XResizeRequestEvent;
  801.  
  802. typedef struct {
  803.     int type;
  804.     unsigned long serial;    /* # of last request processed by server */
  805.     Bool send_event;    /* true if this came from a SendEvent request */
  806.     Display *display;    /* Display the event was read from */
  807.     Window parent;
  808.     Window window;
  809.     int x, y;
  810.     int width, height;
  811.     int border_width;
  812.     Window above;
  813.     int detail;        /* Above, Below, TopIf, BottomIf, Opposite */
  814.     unsigned long value_mask;
  815. } XConfigureRequestEvent;
  816.  
  817. typedef struct {
  818.     int type;
  819.     unsigned long serial;    /* # of last request processed by server */
  820.     Bool send_event;    /* true if this came from a SendEvent request */
  821.     Display *display;    /* Display the event was read from */
  822.     Window event;
  823.     Window window;
  824.     int place;        /* PlaceOnTop, PlaceOnBottom */
  825. } XCirculateEvent;
  826.  
  827. typedef struct {
  828.     int type;
  829.     unsigned long serial;    /* # of last request processed by server */
  830.     Bool send_event;    /* true if this came from a SendEvent request */
  831.     Display *display;    /* Display the event was read from */
  832.     Window parent;
  833.     Window window;
  834.     int place;        /* PlaceOnTop, PlaceOnBottom */
  835. } XCirculateRequestEvent;
  836.  
  837. typedef struct {
  838.     int type;
  839.     unsigned long serial;    /* # of last request processed by server */
  840.     Bool send_event;    /* true if this came from a SendEvent request */
  841.     Display *display;    /* Display the event was read from */
  842.     Window window;
  843.     Atom atom;
  844.     Time time;
  845.     int state;        /* NewValue, Deleted */
  846. } XPropertyEvent;
  847.  
  848. typedef struct {
  849.     int type;
  850.     unsigned long serial;    /* # of last request processed by server */
  851.     Bool send_event;    /* true if this came from a SendEvent request */
  852.     Display *display;    /* Display the event was read from */
  853.     Window window;
  854.     Atom selection;
  855.     Time time;
  856. } XSelectionClearEvent;
  857.  
  858. typedef struct {
  859.     int type;
  860.     unsigned long serial;    /* # of last request processed by server */
  861.     Bool send_event;    /* true if this came from a SendEvent request */
  862.     Display *display;    /* Display the event was read from */
  863.     Window owner;
  864.     Window requestor;
  865.     Atom selection;
  866.     Atom target;
  867.     Atom property;
  868.     Time time;
  869. } XSelectionRequestEvent;
  870.  
  871. typedef struct {
  872.     int type;
  873.     unsigned long serial;    /* # of last request processed by server */
  874.     Bool send_event;    /* true if this came from a SendEvent request */
  875.     Display *display;    /* Display the event was read from */
  876.     Window requestor;
  877.     Atom selection;
  878.     Atom target;
  879.     Atom property;        /* ATOM or None */
  880.     Time time;
  881. } XSelectionEvent;
  882.  
  883. typedef struct {
  884.     int type;
  885.     unsigned long serial;    /* # of last request processed by server */
  886.     Bool send_event;    /* true if this came from a SendEvent request */
  887.     Display *display;    /* Display the event was read from */
  888.     Window window;
  889.     Colormap colormap;    /* COLORMAP or None */
  890. #if defined(__cplusplus) || defined(c_plusplus)
  891.     Bool c_new;        /* C++ */
  892. #else
  893.     Bool new;
  894. #endif
  895.     int state;        /* ColormapInstalled, ColormapUninstalled */
  896. } XColormapEvent;
  897.  
  898. typedef struct {
  899.     int type;
  900.     unsigned long serial;    /* # of last request processed by server */
  901.     Bool send_event;    /* true if this came from a SendEvent request */
  902.     Display *display;    /* Display the event was read from */
  903.     Window window;
  904.     Atom message_type;
  905.     int format;
  906.     union {
  907.         char b[20];
  908.         short s[10];
  909.         long l[5];
  910.         } data;
  911. } XClientMessageEvent;
  912.  
  913. typedef struct {
  914.     int type;
  915.     unsigned long serial;    /* # of last request processed by server */
  916.     Bool send_event;    /* true if this came from a SendEvent request */
  917.     Display *display;    /* Display the event was read from */
  918.     Window window;        /* unused */
  919.     int request;        /* one of MappingModifier, MappingKeyboard,
  920.                    MappingPointer */
  921.     int first_keycode;    /* first keycode */
  922.     int count;        /* defines range of change w. first_keycode*/
  923. } XMappingEvent;
  924.  
  925. typedef struct {
  926.     int type;
  927.     Display *display;    /* Display the event was read from */
  928.     XID resourceid;        /* resource id */
  929.     unsigned long serial;    /* serial number of failed request */
  930.     unsigned char error_code;    /* error code of failed request */
  931.     unsigned char request_code;    /* Major op-code of failed request */
  932.     unsigned char minor_code;    /* Minor op-code of failed request */
  933. } XErrorEvent;
  934.  
  935. typedef struct {
  936.     int type;
  937.     unsigned long serial;    /* # of last request processed by server */
  938.     Bool send_event;    /* true if this came from a SendEvent request */
  939.     Display *display;/* Display the event was read from */
  940.     Window window;    /* window on which event was requested in event mask */
  941. } XAnyEvent;
  942.  
  943. /*
  944.  * this union is defined so Xlib can always use the same sized
  945.  * event structure internally, to avoid memory fragmentation.
  946.  */
  947. typedef union _XEvent {
  948.         int type;        /* must not be changed; first element */
  949.     XAnyEvent xany;
  950.     XKeyEvent xkey;
  951.     XButtonEvent xbutton;
  952.     XMotionEvent xmotion;
  953.     XCrossingEvent xcrossing;
  954.     XFocusChangeEvent xfocus;
  955.     XExposeEvent xexpose;
  956.     XGraphicsExposeEvent xgraphicsexpose;
  957.     XNoExposeEvent xnoexpose;
  958.     XVisibilityEvent xvisibility;
  959.     XCreateWindowEvent xcreatewindow;
  960.     XDestroyWindowEvent xdestroywindow;
  961.     XUnmapEvent xunmap;
  962.     XMapEvent xmap;
  963.     XMapRequestEvent xmaprequest;
  964.     XReparentEvent xreparent;
  965.     XConfigureEvent xconfigure;
  966.     XGravityEvent xgravity;
  967.     XResizeRequestEvent xresizerequest;
  968.     XConfigureRequestEvent xconfigurerequest;
  969.     XCirculateEvent xcirculate;
  970.     XCirculateRequestEvent xcirculaterequest;
  971.     XPropertyEvent xproperty;
  972.     XSelectionClearEvent xselectionclear;
  973.     XSelectionRequestEvent xselectionrequest;
  974.     XSelectionEvent xselection;
  975.     XColormapEvent xcolormap;
  976.     XClientMessageEvent xclient;
  977.     XMappingEvent xmapping;
  978.     XErrorEvent xerror;
  979.     XKeymapEvent xkeymap;
  980.     long pad[24];
  981. } XEvent;
  982. #endif
  983.  
  984. #define XAllocID(dpy) ((*(dpy)->resource_alloc)((dpy)))
  985.  
  986. /*
  987.  * per character font metric information.
  988.  */
  989. typedef struct {
  990.     short    lbearing;    /* origin to left edge of raster */
  991.     short    rbearing;    /* origin to right edge of raster */
  992.     short    width;        /* advance to next char's origin */
  993.     short    ascent;        /* baseline to top edge of raster */
  994.     short    descent;    /* baseline to bottom edge of raster */
  995.     unsigned short attributes;    /* per char flags (not predefined) */
  996. } XCharStruct;
  997.  
  998. /*
  999.  * To allow arbitrary information with fonts, there are additional properties
  1000.  * returned.
  1001.  */
  1002. typedef struct {
  1003.     Atom name;
  1004.     unsigned long card32;
  1005. } XFontProp;
  1006.  
  1007. typedef struct {
  1008.     XExtData    *ext_data;    /* hook for extension to hang data */
  1009.     Font        fid;            /* Font id for this font */
  1010.     unsigned    direction;    /* hint about direction the font is painted */
  1011.     unsigned    min_char_or_byte2;/* first character */
  1012.     unsigned    max_char_or_byte2;/* last character */
  1013.     unsigned    min_byte1;    /* first row that exists */
  1014.     unsigned    max_byte1;    /* last row that exists */
  1015.     Bool    all_chars_exist;/* flag if all characters have non-zero size*/
  1016.     unsigned    default_char;    /* char to print for undefined character */
  1017.     int         n_properties;   /* how many properties there are */
  1018.     XFontProp    *properties;    /* pointer to array of additional properties*/
  1019.     XCharStruct    min_bounds;    /* minimum bounds over all existing char*/
  1020.     XCharStruct    max_bounds;    /* maximum bounds over all existing char*/
  1021.     XCharStruct    *per_char;    /* first_char to last_char information */
  1022.     int        ascent;        /* log. extent above baseline for spacing */
  1023.     int        descent;    /* log. descent below baseline for spacing */
  1024. } XFontStruct;
  1025.  
  1026. /*
  1027.  * PolyText routines take these as arguments.
  1028.  */
  1029. typedef struct {
  1030.     char *chars;        /* pointer to string */
  1031.     int nchars;            /* number of characters */
  1032.     int delta;            /* delta between strings */
  1033.     Font font;            /* font to print it in, None don't change */
  1034. } XTextItem;
  1035.  
  1036. typedef struct {        /* normal 16 bit characters are two bytes */
  1037.     unsigned char byte1;
  1038.     unsigned char byte2;
  1039. } XChar2b;
  1040.  
  1041. typedef struct {
  1042.     XChar2b *chars;        /* two byte characters */
  1043.     int nchars;            /* number of characters */
  1044.     int delta;            /* delta between strings */
  1045.     Font font;            /* font to print it in, None don't change */
  1046. } XTextItem16;
  1047.  
  1048.  
  1049. typedef union { Display *display;
  1050.         GC gc;
  1051.         Visual *visual;
  1052.         Screen *screen;
  1053.         ScreenFormat *pixmap_format;
  1054.         XFontStruct *font; } XEDataObject;
  1055.  
  1056. typedef struct {
  1057.     XRectangle      max_ink_extent;
  1058.     XRectangle      max_logical_extent;
  1059. } XFontSetExtents;
  1060.  
  1061. typedef struct _XFontSet *XFontSet;
  1062.  
  1063. typedef struct {
  1064.     char           *chars;
  1065.     int             nchars;
  1066.     int             delta;
  1067.     XFontSet        font_set;
  1068. } XmbTextItem;
  1069.  
  1070. typedef struct {
  1071.     wchar_t        *chars;
  1072.     int             nchars;
  1073.     int             delta;
  1074.     XFontSet        font_set;
  1075. } XwcTextItem;
  1076.  
  1077. typedef void (*XIMProc)();
  1078.  
  1079. typedef struct _XIM *XIM;
  1080. typedef struct _XIC *XIC;
  1081.  
  1082. typedef unsigned long XIMStyle;
  1083.  
  1084. typedef struct {
  1085.     unsigned short count_styles;
  1086.     XIMStyle *supported_styles;
  1087. } XIMStyles;
  1088.  
  1089. #define XIMPreeditArea        0x0001L
  1090. #define XIMPreeditCallbacks    0x0002L
  1091. #define XIMPreeditPosition    0x0004L
  1092. #define XIMPreeditNothing    0x0008L
  1093. #define XIMPreeditNone        0x0010L
  1094. #define XIMStatusArea        0x0100L
  1095. #define XIMStatusCallbacks    0x0200L
  1096. #define XIMStatusNothing    0x0400L
  1097. #define XIMStatusNone        0x0800L
  1098.  
  1099. #define XNVaNestedList "XNVaNestedList"
  1100. #define XNQueryInputStyle "queryInputStyle"
  1101. #define XNClientWindow "clientWindow"
  1102. #define XNInputStyle "inputStyle"
  1103. #define XNFocusWindow "focusWindow"
  1104. #define XNResourceName "resourceName"
  1105. #define XNResourceClass "resourceClass"
  1106. #define XNGeometryCallback "geometryCallback"
  1107. #define XNFilterEvents "filterEvents"
  1108. #define XNPreeditStartCallback "preeditStartCallback"
  1109. #define XNPreeditDoneCallback "preeditDoneCallback"
  1110. #define XNPreeditDrawCallback "preeditDrawCallback"
  1111. #define XNPreeditCaretCallback "preeditCaretCallback"
  1112. #define XNPreeditAttributes "preeditAttributes"
  1113. #define XNStatusStartCallback "statusStartCallback"
  1114. #define XNStatusDoneCallback "statusDoneCallback"
  1115. #define XNStatusDrawCallback "statusDrawCallback"
  1116. #define XNStatusAttributes "statusAttributes"
  1117. #define XNArea "area"
  1118. #define XNAreaNeeded "areaNeeded"
  1119. #define XNSpotLocation "spotLocation"
  1120. #define XNColormap "colorMap"
  1121. #define XNStdColormap "stdColorMap"
  1122. #define XNForeground "foreground"
  1123. #define XNBackground "background"
  1124. #define XNBackgroundPixmap "backgroundPixmap"
  1125. #define XNFontSet "fontSet"
  1126. #define XNLineSpace "lineSpace"
  1127. #define XNCursor "cursor"
  1128.  
  1129. #define XBufferOverflow        -1
  1130. #define XLookupNone        1
  1131. #define XLookupChars        2
  1132. #define XLookupKeySym        3
  1133. #define XLookupBoth        4
  1134.  
  1135. #if NeedFunctionPrototypes
  1136. typedef void *XVaNestedList;
  1137. #else
  1138. typedef XPointer XVaNestedList;
  1139. #endif
  1140.  
  1141. typedef struct {
  1142.     XPointer client_data;
  1143.     XIMProc callback;
  1144. } XIMCallback;
  1145.  
  1146. typedef unsigned long XIMFeedback;
  1147.  
  1148. #define XIMReverse    1
  1149. #define XIMUnderline    (1<<1) 
  1150. #define XIMHighlight    (1<<2)
  1151. #define XIMPrimary     (1<<5)
  1152. #define XIMSecondary    (1<<6)
  1153. #define XIMTertiary     (1<<7)
  1154.  
  1155. typedef struct _XIMText {
  1156.     unsigned short length;
  1157.     XIMFeedback *feedback;
  1158.     Bool encoding_is_wchar; 
  1159.     union {
  1160.     char *multi_byte;
  1161.     wchar_t *wide_char;
  1162.     } string; 
  1163. } XIMText;
  1164.  
  1165. typedef struct _XIMPreeditDrawCallbackStruct {
  1166.     int caret;        /* Cursor offset within pre-edit string */
  1167.     int chg_first;    /* Starting change position */
  1168.     int chg_length;    /* Length of the change in character count */
  1169.     XIMText *text;
  1170. } XIMPreeditDrawCallbackStruct;
  1171.  
  1172. typedef enum {
  1173.     XIMForwardChar, XIMBackwardChar,
  1174.     XIMForwardWord, XIMBackwardWord,
  1175.     XIMCaretUp, XIMCaretDown,
  1176.     XIMNextLine, XIMPreviousLine,
  1177.     XIMLineStart, XIMLineEnd, 
  1178.     XIMAbsolutePosition,
  1179.     XIMDontChange
  1180. } XIMCaretDirection;
  1181.  
  1182. typedef enum {
  1183.     XIMIsInvisible,    /* Disable caret feedback */ 
  1184.     XIMIsPrimary,    /* UI defined caret feedback */
  1185.     XIMIsSecondary    /* UI defined caret feedback */
  1186. } XIMCaretStyle;
  1187.  
  1188. typedef struct _XIMPreeditCaretCallbackStruct {
  1189.     int position;         /* Caret offset within pre-edit string */
  1190.     XIMCaretDirection direction; /* Caret moves direction */
  1191.     XIMCaretStyle style;     /* Feedback of the caret */
  1192. } XIMPreeditCaretCallbackStruct;
  1193.  
  1194. typedef enum {
  1195.     XIMTextType,
  1196.     XIMBitmapType
  1197. } XIMStatusDataType;
  1198.     
  1199. typedef struct _XIMStatusDrawCallbackStruct {
  1200.     XIMStatusDataType type;
  1201.     union {
  1202.     XIMText *text;
  1203.     Pixmap  bitmap;
  1204.     } data;
  1205. } XIMStatusDrawCallbackStruct;
  1206.  
  1207. _XFUNCPROTOBEGIN
  1208.  
  1209. #ifndef MAKELIBRARY
  1210.  
  1211. extern XFontStruct *XLoadQueryFont(
  1212. #if NeedFunctionPrototypes
  1213.     Display*        /* display */,
  1214.     char*    /* name */
  1215. #endif
  1216. );
  1217.  
  1218. extern XFontStruct *XQueryFont(
  1219. #if NeedFunctionPrototypes
  1220.     Display*        /* display */,
  1221.     XID            /* font_ID */
  1222. #endif
  1223. );
  1224.  
  1225.  
  1226. extern XTimeCoord *XGetMotionEvents(
  1227. #if NeedFunctionPrototypes
  1228.     Display*        /* display */,
  1229.     Window        /* w */,
  1230.     Time        /* start */,
  1231.     Time        /* stop */,
  1232.     int*        /* nevents_return */
  1233. #endif
  1234. );
  1235.  
  1236. extern XModifierKeymap *XDeleteModifiermapEntry(
  1237. #if NeedFunctionPrototypes
  1238.     XModifierKeymap*    /* modmap */,
  1239. #if NeedWidePrototypes
  1240.     unsigned int    /* keycode_entry */,
  1241. #else
  1242.     KeyCode        /* keycode_entry */,
  1243. #endif
  1244.     int            /* modifier */
  1245. #endif
  1246. );
  1247.  
  1248. extern XModifierKeymap    *XGetModifierMapping(
  1249. #if NeedFunctionPrototypes
  1250.     Display*        /* display */
  1251. #endif
  1252. );
  1253.  
  1254. extern XModifierKeymap    *XInsertModifiermapEntry(
  1255. #if NeedFunctionPrototypes
  1256.     XModifierKeymap*    /* modmap */,
  1257. #if NeedWidePrototypes
  1258.     unsigned int    /* keycode_entry */,
  1259. #else
  1260.     KeyCode        /* keycode_entry */,
  1261. #endif
  1262.     int            /* modifier */    
  1263. #endif
  1264. );
  1265.  
  1266. extern XModifierKeymap *XNewModifiermap(
  1267. #if NeedFunctionPrototypes
  1268.     int            /* max_keys_per_mod */
  1269. #endif
  1270. );
  1271.  
  1272. extern XImage *XCreateImage(
  1273. #if NeedFunctionPrototypes
  1274.     Display*        /* display */,
  1275.     Visual*        /* visual */,
  1276.     unsigned int    /* depth */,
  1277.     int            /* format */,
  1278.     int            /* offset */,
  1279.     char*        /* data */,
  1280.     unsigned int    /* width */,
  1281.     unsigned int    /* height */,
  1282.     int            /* bitmap_pad */,
  1283.     int            /* bytes_per_line */
  1284. #endif
  1285. );
  1286. extern XImage *XGetImage(
  1287. #if NeedFunctionPrototypes
  1288.     Display*        /* display */,
  1289.     Drawable        /* d */,
  1290.     int            /* x */,
  1291.     int            /* y */,
  1292.     unsigned int    /* width */,
  1293.     unsigned int    /* height */,
  1294.     unsigned long    /* plane_mask */,
  1295.     int            /* format */
  1296. #endif
  1297. );
  1298. extern XImage *XGetSubImage(
  1299. #if NeedFunctionPrototypes
  1300.     Display*        /* display */,
  1301.     Drawable        /* d */,
  1302.     int            /* x */,
  1303.     int            /* y */,
  1304.     unsigned int    /* width */,
  1305.     unsigned int    /* height */,
  1306.     unsigned long    /* plane_mask */,
  1307.     int            /* format */,
  1308.     XImage*        /* dest_image */,
  1309.     int            /* dest_x */,
  1310.     int            /* dest_y */
  1311. #endif
  1312. );
  1313.  
  1314. /* 
  1315.  * X function declarations.
  1316.  */
  1317. extern Display *XOpenDisplay(
  1318. #if NeedFunctionPrototypes
  1319.     char*    /* display_name */
  1320. #endif
  1321. );
  1322.  
  1323. extern void XrmInitialize(
  1324. #if NeedFunctionPrototypes
  1325.     void
  1326. #endif
  1327. );
  1328.  
  1329. extern char *XFetchBytes(
  1330. #if NeedFunctionPrototypes
  1331.     Display*        /* display */,
  1332.     int*        /* nbytes_return */
  1333. #endif
  1334. );
  1335. extern char *XFetchBuffer(
  1336. #if NeedFunctionPrototypes
  1337.     Display*        /* display */,
  1338.     int*        /* nbytes_return */,
  1339.     int            /* buffer */
  1340. #endif
  1341. );
  1342. extern char *XGetAtomName(
  1343. #if NeedFunctionPrototypes
  1344.     Display*        /* display */,
  1345.     Atom        /* atom */
  1346. #endif
  1347. );
  1348. extern char *XGetDefault(
  1349. #if NeedFunctionPrototypes
  1350.     Display*        /* display */,
  1351.      char*    /* program */,
  1352.      char*    /* option */          
  1353. #endif
  1354. );
  1355. extern char *XDisplayName(
  1356. #if NeedFunctionPrototypes
  1357.      char*    /* string */
  1358. #endif
  1359. );
  1360. extern char *XKeysymToString(
  1361. #if NeedFunctionPrototypes
  1362.     KeySym        /* keysym */
  1363. #endif
  1364. );
  1365.  
  1366. extern int (*XSynchronize(
  1367. #if NeedFunctionPrototypes
  1368.     Display*        /* display */,
  1369.     Bool        /* onoff */
  1370. #endif
  1371. ))();
  1372. extern int (*XSetAfterFunction(
  1373. #if NeedFunctionPrototypes
  1374.     Display*        /* display */,
  1375.     int (*) (
  1376. #if NeedNestedPrototypes
  1377.          Display*    /* display */
  1378. #endif
  1379.             )        /* procedure */
  1380. #endif
  1381. ))();
  1382. extern Atom XInternAtom(
  1383. #if NeedFunctionPrototypes
  1384.     Display*        /* display */,
  1385.      char*    /* atom_name */,
  1386.     Bool        /* only_if_exists */         
  1387. #endif
  1388. );
  1389. extern Colormap XCopyColormapAndFree(
  1390. #if NeedFunctionPrototypes
  1391.     Display*        /* display */,
  1392.     Colormap        /* colormap */
  1393. #endif
  1394. );
  1395. extern Colormap XCreateColormap(
  1396. #if NeedFunctionPrototypes
  1397.     Display*        /* display */,
  1398.     Window        /* w */,
  1399.     Visual*        /* visual */,
  1400.     int            /* alloc */             
  1401. #endif
  1402. );
  1403. extern Cursor XCreatePixmapCursor(
  1404. #if NeedFunctionPrototypes
  1405.     Display*        /* display */,
  1406.     Pixmap        /* source */,
  1407.     Pixmap        /* mask */,
  1408.     XColor*        /* foreground_color */,
  1409.     XColor*        /* background_color */,
  1410.     unsigned int    /* x */,
  1411.     unsigned int    /* y */               
  1412. #endif
  1413. );
  1414. extern Cursor XCreateGlyphCursor(
  1415. #if NeedFunctionPrototypes
  1416.     Display*        /* display */,
  1417.     Font        /* source_font */,
  1418.     Font        /* mask_font */,
  1419.     unsigned int    /* source_char */,
  1420.     unsigned int    /* mask_char */,
  1421.     XColor*        /* foreground_color */,
  1422.     XColor*        /* background_color */
  1423. #endif
  1424. );
  1425. extern Cursor XCreateFontCursor(
  1426. #if NeedFunctionPrototypes
  1427.     Display*        /* display */,
  1428.     unsigned int    /* shape */
  1429. #endif
  1430. );
  1431. extern Font XLoadFont(
  1432. #if NeedFunctionPrototypes
  1433.     Display*        /* display */,
  1434.     char*    /* name */
  1435. #endif
  1436. );
  1437. extern GC XCreateGC(
  1438. #if NeedFunctionPrototypes
  1439.     Display*        /* display */,
  1440.     Drawable        /* d */,
  1441.     unsigned long    /* valuemask */,
  1442.     XGCValues*        /* values */
  1443. #endif
  1444. );
  1445. extern GContext XGContextFromGC(
  1446. #if NeedFunctionPrototypes
  1447.     GC            /* gc */
  1448. #endif
  1449. );
  1450. extern void XFlushGC(
  1451. #if NeedFunctionPrototypes
  1452.     Display*        /* display */,
  1453.     GC            /* gc */
  1454. #endif
  1455. );
  1456. extern Pixmap XCreatePixmap(
  1457. #if NeedFunctionPrototypes
  1458.     Display*        /* display */,
  1459.     Drawable        /* d */,
  1460.     unsigned int    /* width */,
  1461.     unsigned int    /* height */,
  1462.     unsigned int    /* depth */                
  1463. #endif
  1464. );
  1465. extern Pixmap XCreateBitmapFromData(
  1466. #if NeedFunctionPrototypes
  1467.     Display*        /* display */,
  1468.     Drawable        /* d */,
  1469.     char*    /* data */,
  1470.     unsigned int    /* width */,
  1471.     unsigned int    /* height */
  1472. #endif
  1473. );
  1474. extern Pixmap XCreatePixmapFromBitmapData(
  1475. #if NeedFunctionPrototypes
  1476.     Display*        /* display */,
  1477.     Drawable        /* d */,
  1478.     char*        /* data */,
  1479.     unsigned int    /* width */,
  1480.     unsigned int    /* height */,
  1481.     unsigned long    /* fg */,
  1482.     unsigned long    /* bg */,
  1483.     unsigned int    /* depth */
  1484. #endif
  1485. );
  1486. extern Window XCreateSimpleWindow(
  1487. #if NeedFunctionPrototypes
  1488.     Display*        /* display */,
  1489.     Window        /* parent */,
  1490.     int            /* x */,
  1491.     int            /* y */,
  1492.     unsigned int    /* width */,
  1493.     unsigned int    /* height */,
  1494.     unsigned int    /* border_width */,
  1495.     unsigned long    /* border */,
  1496.     unsigned long    /* background */
  1497. #endif
  1498. );
  1499. extern Window XGetSelectionOwner(
  1500. #if NeedFunctionPrototypes
  1501.     Display*        /* display */,
  1502.     Atom        /* selection */
  1503. #endif
  1504. );
  1505. extern Window XCreateWindow(
  1506. #if NeedFunctionPrototypes
  1507.     Display*        /* display */,
  1508.     Window        /* parent */,
  1509.     int            /* x */,
  1510.     int            /* y */,
  1511.     unsigned int    /* width */,
  1512.     unsigned int    /* height */,
  1513.     unsigned int    /* border_width */,
  1514.     int            /* depth */,
  1515.     unsigned int    /* class */,
  1516.     Visual*        /* visual */,
  1517.     unsigned long    /* valuemask */,
  1518.     XSetWindowAttributes*    /* attributes */
  1519. #endif
  1520. ); 
  1521. extern Colormap *XListInstalledColormaps(
  1522. #if NeedFunctionPrototypes
  1523.     Display*        /* display */,
  1524.     Window        /* w */,
  1525.     int*        /* num_return */
  1526. #endif
  1527. );
  1528. extern char **XListFonts(
  1529. #if NeedFunctionPrototypes
  1530.     Display*        /* display */,
  1531.      char*    /* pattern */,
  1532.     int            /* maxnames */,
  1533.     int*        /* actual_count_return */
  1534. #endif
  1535. );
  1536. extern char **XListFontsWithInfo(
  1537. #if NeedFunctionPrototypes
  1538.     Display*        /* display */,
  1539.      char*    /* pattern */,
  1540.     int            /* maxnames */,
  1541.     int*        /* count_return */,
  1542.     XFontStruct**    /* info_return */
  1543. #endif
  1544. );
  1545. extern char **XGetFontPath(
  1546. #if NeedFunctionPrototypes
  1547.     Display*        /* display */,
  1548.     int*        /* npaths_return */
  1549. #endif
  1550. );
  1551. extern char **XListExtensions(
  1552. #if NeedFunctionPrototypes
  1553.     Display*        /* display */,
  1554.     int*        /* nextensions_return */
  1555. #endif
  1556. );
  1557. extern Atom *XListProperties(
  1558. #if NeedFunctionPrototypes
  1559.     Display*        /* display */,
  1560.     Window        /* w */,
  1561.     int*        /* num_prop_return */
  1562. #endif
  1563. );
  1564. extern XHostAddress *XListHosts(
  1565. #if NeedFunctionPrototypes
  1566.     Display*        /* display */,
  1567.     int*        /* nhosts_return */,
  1568.     Bool*        /* state_return */
  1569. #endif
  1570. );
  1571. extern KeySym XKeycodeToKeysym(
  1572. #if NeedFunctionPrototypes
  1573.     Display*        /* display */,
  1574. #if NeedWidePrototypes
  1575.     unsigned int    /* keycode */,
  1576. #else
  1577.     KeyCode        /* keycode */,
  1578. #endif
  1579.     int            /* index */
  1580. #endif
  1581. );
  1582. extern KeySym XLookupKeysym(
  1583. #if NeedFunctionPrototypes
  1584.     XKeyEvent*        /* key_event */,
  1585.     int            /* index */
  1586. #endif
  1587. );
  1588. extern KeySym *XGetKeyboardMapping(
  1589. #if NeedFunctionPrototypes
  1590.     Display*        /* display */,
  1591. #if NeedWidePrototypes
  1592.     unsigned int    /* first_keycode */,
  1593. #else
  1594.     KeyCode        /* first_keycode */,
  1595. #endif
  1596.     int            /* keycode_count */,
  1597.     int*        /* keysyms_per_keycode_return */
  1598. #endif
  1599. );
  1600. extern KeySym XStringToKeysym(
  1601. #if NeedFunctionPrototypes
  1602.      char*    /* string */
  1603. #endif
  1604. );
  1605. extern long XMaxRequestSize(
  1606. #if NeedFunctionPrototypes
  1607.     Display*        /* display */
  1608. #endif
  1609. );
  1610. extern char *XResourceManagerString(
  1611. #if NeedFunctionPrototypes
  1612.     Display*        /* display */
  1613. #endif
  1614. );
  1615. extern char *XScreenResourceString(
  1616. #if NeedFunctionPrototypes
  1617.     Screen*        /* screen */
  1618. #endif
  1619. );
  1620. extern unsigned long XDisplayMotionBufferSize(
  1621. #if NeedFunctionPrototypes
  1622.     Display*        /* display */
  1623. #endif
  1624. );
  1625. extern VisualID XVisualIDFromVisual(
  1626. #if NeedFunctionPrototypes
  1627.     Visual*        /* visual */
  1628. #endif
  1629. );
  1630.  
  1631. /* routines for dealing with extensions */
  1632.  
  1633. extern XExtCodes *XInitExtension(
  1634. #if NeedFunctionPrototypes
  1635.     Display*        /* display */,
  1636.      char*    /* name */
  1637. #endif
  1638. );
  1639.  
  1640. extern XExtCodes *XAddExtension(
  1641. #if NeedFunctionPrototypes
  1642.     Display*        /* display */
  1643. #endif
  1644. );
  1645. extern XExtData *XFindOnExtensionList(
  1646. #if NeedFunctionPrototypes
  1647.     XExtData**        /* structure */,
  1648.     int            /* number */
  1649. #endif
  1650. );
  1651. extern XExtData **XEHeadOfExtensionList(
  1652. #if NeedFunctionPrototypes
  1653.     XEDataObject    /* object */
  1654. #endif
  1655. );
  1656.  
  1657. /* these are routines for which there are also macros */
  1658. extern Window XRootWindow(
  1659. #if NeedFunctionPrototypes
  1660.     Display*        /* display */,
  1661.     int            /* screen_number */
  1662. #endif
  1663. );
  1664. extern Window XDefaultRootWindow(
  1665. #if NeedFunctionPrototypes
  1666.     Display*        /* display */
  1667. #endif
  1668. );
  1669. extern Window XRootWindowOfScreen(
  1670. #if NeedFunctionPrototypes
  1671.     Screen*        /* screen */
  1672. #endif
  1673. );
  1674. extern Visual *XDefaultVisual(
  1675. #if NeedFunctionPrototypes
  1676.     Display*        /* display */,
  1677.     int            /* screen_number */
  1678. #endif
  1679. );
  1680. extern Visual *XDefaultVisualOfScreen(
  1681. #if NeedFunctionPrototypes
  1682.     Screen*        /* screen */
  1683. #endif
  1684. );
  1685. extern GC XDefaultGC(
  1686. #if NeedFunctionPrototypes
  1687.     Display*        /* display */,
  1688.     int            /* screen_number */
  1689. #endif
  1690. );
  1691. extern GC XDefaultGCOfScreen(
  1692. #if NeedFunctionPrototypes
  1693.     Screen*        /* screen */
  1694. #endif
  1695. );
  1696. extern unsigned long XBlackPixel(
  1697. #if NeedFunctionPrototypes
  1698.     Display*        /* display */,
  1699.     int            /* screen_number */
  1700. #endif
  1701. );
  1702. extern unsigned long XWhitePixel(
  1703. #if NeedFunctionPrototypes
  1704.     Display*        /* display */,
  1705.     int            /* screen_number */
  1706. #endif
  1707. );
  1708. extern unsigned long XAllPlanes(
  1709. #if NeedFunctionPrototypes
  1710.     void
  1711. #endif
  1712. );
  1713. extern unsigned long XBlackPixelOfScreen(
  1714. #if NeedFunctionPrototypes
  1715.     Screen*        /* screen */
  1716. #endif
  1717. );
  1718. extern unsigned long XWhitePixelOfScreen(
  1719. #if NeedFunctionPrototypes
  1720.     Screen*        /* screen */
  1721. #endif
  1722. );
  1723. extern unsigned long XNextRequest(
  1724. #if NeedFunctionPrototypes
  1725.     Display*        /* display */
  1726. #endif
  1727. );
  1728. extern unsigned long XLastKnownRequestProcessed(
  1729. #if NeedFunctionPrototypes
  1730.     Display*        /* display */
  1731. #endif
  1732. );
  1733. extern char *XServerVendor(
  1734. #if NeedFunctionPrototypes
  1735.     Display*        /* display */
  1736. #endif
  1737. );
  1738. extern char *XDisplayString(
  1739. #if NeedFunctionPrototypes
  1740.     Display*        /* display */
  1741. #endif
  1742. );
  1743. extern Colormap XDefaultColormap(
  1744. #if NeedFunctionPrototypes
  1745.     Display*        /* display */,
  1746.     int            /* screen_number */
  1747. #endif
  1748. );
  1749. extern Colormap XDefaultColormapOfScreen(
  1750. #if NeedFunctionPrototypes
  1751.     Screen*        /* screen */
  1752. #endif
  1753. );
  1754. extern Display *XDisplayOfScreen(
  1755. #if NeedFunctionPrototypes
  1756.     Screen*        /* screen */
  1757. #endif
  1758. );
  1759. extern Screen *XScreenOfDisplay(
  1760. #if NeedFunctionPrototypes
  1761.     Display*        /* display */,
  1762.     int            /* screen_number */
  1763. #endif
  1764. );
  1765. extern Screen *XDefaultScreenOfDisplay(
  1766. #if NeedFunctionPrototypes
  1767.     Display*        /* display */
  1768. #endif
  1769. );
  1770. extern long XEventMaskOfScreen(
  1771. #if NeedFunctionPrototypes
  1772.     Screen*        /* screen */
  1773. #endif
  1774. );
  1775.  
  1776. extern int XScreenNumberOfScreen(
  1777. #if NeedFunctionPrototypes
  1778.     Screen*        /* screen */
  1779. #endif
  1780. );
  1781.  
  1782. typedef int (*XErrorHandler) (        /* WARNING, this type not in Xlib spec */
  1783. #if NeedFunctionPrototypes
  1784.     Display*        /* display */,
  1785.     XErrorEvent*    /* error_event */
  1786. #endif
  1787. );
  1788.  
  1789. extern XErrorHandler XSetErrorHandler (
  1790. #if NeedFunctionPrototypes
  1791.     XErrorHandler    /* handler */
  1792. #endif
  1793. );
  1794.  
  1795.  
  1796. typedef int (*XIOErrorHandler) (    /* WARNING, this type not in Xlib spec */
  1797. #if NeedFunctionPrototypes
  1798.     Display*        /* display */
  1799. #endif
  1800. );
  1801.  
  1802. extern XIOErrorHandler XSetIOErrorHandler (
  1803. #if NeedFunctionPrototypes
  1804.     XIOErrorHandler    /* handler */
  1805. #endif
  1806. );
  1807.  
  1808.  
  1809. extern XPixmapFormatValues *XListPixmapFormats(
  1810. #if NeedFunctionPrototypes
  1811.     Display*        /* display */,
  1812.     int*        /* count_return */
  1813. #endif
  1814. );
  1815. extern int *XListDepths(
  1816. #if NeedFunctionPrototypes
  1817.     Display*        /* display */,
  1818.     int            /* screen_number */,
  1819.     int*        /* count_return */
  1820. #endif
  1821. );
  1822.  
  1823. /* ICCCM routines for things that don't require special include files; */
  1824. /* other declarations are given in Xutil.h                             */
  1825. extern Status XReconfigureWMWindow(
  1826. #if NeedFunctionPrototypes
  1827.     Display*        /* display */,
  1828.     Window        /* w */,
  1829.     int            /* screen_number */,
  1830.     unsigned int    /* mask */,
  1831.     XWindowChanges*    /* changes */
  1832. #endif
  1833. );
  1834.  
  1835. extern Status XGetWMProtocols(
  1836. #if NeedFunctionPrototypes
  1837.     Display*        /* display */,
  1838.     Window        /* w */,
  1839.     Atom**        /* protocols_return */,
  1840.     int*        /* count_return */
  1841. #endif
  1842. );
  1843. extern Status XSetWMProtocols(
  1844. #if NeedFunctionPrototypes
  1845.     Display*        /* display */,
  1846.     Window        /* w */,
  1847.     Atom*        /* protocols */,
  1848.     int            /* count */
  1849. #endif
  1850. );
  1851. extern Status XIconifyWindow(
  1852. #if NeedFunctionPrototypes
  1853.     Display*        /* display */,
  1854.     Window        /* w */,
  1855.     int            /* screen_number */
  1856. #endif
  1857. );
  1858. extern Status XWithdrawWindow(
  1859. #if NeedFunctionPrototypes
  1860.     Display*        /* display */,
  1861.     Window        /* w */,
  1862.     int            /* screen_number */
  1863. #endif
  1864. );
  1865. extern Status XGetCommand(
  1866. #if NeedFunctionPrototypes
  1867.     Display*        /* display */,
  1868.     Window        /* w */,
  1869.     char***        /* argv_return */,
  1870.     int*        /* argc_return */
  1871. #endif
  1872. );
  1873. extern Status XGetWMColormapWindows(
  1874. #if NeedFunctionPrototypes
  1875.     Display*        /* display */,
  1876.     Window        /* w */,
  1877.     Window**        /* windows_return */,
  1878.     int*        /* count_return */
  1879. #endif
  1880. );
  1881. extern Status XSetWMColormapWindows(
  1882. #if NeedFunctionPrototypes
  1883.     Display*        /* display */,
  1884.     Window        /* w */,
  1885.     Window*        /* colormap_windows */,
  1886.     int            /* count */
  1887. #endif
  1888. );
  1889. extern void XFreeStringList(
  1890. #if NeedFunctionPrototypes
  1891.     char**        /* list */
  1892. #endif
  1893. );
  1894. extern XSetTransientForHint(
  1895. #if NeedFunctionPrototypes
  1896.     Display*        /* display */,
  1897.     Window        /* w */,
  1898.     Window        /* prop_window */
  1899. #endif
  1900. );
  1901.  
  1902. /* The following are given in alphabetical order */
  1903.  
  1904. extern XActivateScreenSaver(
  1905. #if NeedFunctionPrototypes
  1906.     Display*        /* display */
  1907. #endif
  1908. );
  1909.  
  1910. extern XAddHost(
  1911. #if NeedFunctionPrototypes
  1912.     Display*        /* display */,
  1913.     XHostAddress*    /* host */
  1914. #endif
  1915. );
  1916.  
  1917. extern XAddHosts(
  1918. #if NeedFunctionPrototypes
  1919.     Display*        /* display */,
  1920.     XHostAddress*    /* hosts */,
  1921.     int            /* num_hosts */    
  1922. #endif
  1923. );
  1924.  
  1925. extern XAddToExtensionList(
  1926. #if NeedFunctionPrototypes
  1927.     struct _XExtData**    /* structure */,
  1928.     XExtData*        /* ext_data */
  1929. #endif
  1930. );
  1931.  
  1932. extern XAddToSaveSet(
  1933. #if NeedFunctionPrototypes
  1934.     Display*        /* display */,
  1935.     Window        /* w */
  1936. #endif
  1937. );
  1938.  
  1939. extern Status XAllocColor(
  1940. #if NeedFunctionPrototypes
  1941.     Display*        /* display */,
  1942.     Colormap        /* colormap */,
  1943.     XColor*        /* screen_in_out */
  1944. #endif
  1945. );
  1946.  
  1947. extern Status XAllocColorCells(
  1948. #if NeedFunctionPrototypes
  1949.     Display*        /* display */,
  1950.     Colormap        /* colormap */,
  1951.     Bool            /* contig */,
  1952.     unsigned long*    /* plane_masks_return */,
  1953.     unsigned int    /* nplanes */,
  1954.     unsigned long*    /* pixels_return */,
  1955.     unsigned int     /* npixels */
  1956. #endif
  1957. );
  1958.  
  1959. extern Status XAllocColorPlanes(
  1960. #if NeedFunctionPrototypes
  1961.     Display*        /* display */,
  1962.     Colormap        /* colormap */,
  1963.     Bool        /* contig */,
  1964.     unsigned long*    /* pixels_return */,
  1965.     int            /* ncolors */,
  1966.     int            /* nreds */,
  1967.     int            /* ngreens */,
  1968.     int            /* nblues */,
  1969.     unsigned long*    /* rmask_return */,
  1970.     unsigned long*    /* gmask_return */,
  1971.     unsigned long*    /* bmask_return */
  1972. #endif
  1973. );
  1974.  
  1975. extern Status XAllocNamedColor(
  1976. #if NeedFunctionPrototypes
  1977.     Display*        /* display */,
  1978.     Colormap        /* colormap */,
  1979.     char*    /* color_name */,
  1980.     XColor*        /* screen_def_return */,
  1981.     XColor*        /* exact_def_return */
  1982. #endif
  1983. );
  1984.  
  1985. extern XAllowEvents(
  1986. #if NeedFunctionPrototypes
  1987.     Display*        /* display */,
  1988.     int            /* event_mode */,
  1989.     Time        /* time */
  1990. #endif
  1991. );
  1992.  
  1993. extern XAutoRepeatOff(
  1994. #if NeedFunctionPrototypes
  1995.     Display*        /* display */
  1996. #endif
  1997. );
  1998.  
  1999. extern XAutoRepeatOn(
  2000. #if NeedFunctionPrototypes
  2001.     Display*        /* display */
  2002. #endif
  2003. );
  2004.  
  2005. extern XBell(
  2006. #if NeedFunctionPrototypes
  2007.     Display*        /* display */,
  2008.     int            /* percent */
  2009. #endif
  2010. );
  2011.  
  2012. extern int XBitmapBitOrder(
  2013. #if NeedFunctionPrototypes
  2014.     Display*        /* display */
  2015. #endif
  2016. );
  2017.  
  2018. extern int XBitmapPad(
  2019. #if NeedFunctionPrototypes
  2020.     Display*    
  2021. #endif
  2022. );
  2023.  
  2024. extern int XBitmapUnit(
  2025. #if NeedFunctionPrototypes
  2026.     Display*        /* display */
  2027. #endif
  2028. );
  2029.  
  2030. extern int XCellsOfScreen(
  2031. #if NeedFunctionPrototypes
  2032.     Screen*        /* screen */
  2033. #endif
  2034. );
  2035.  
  2036. extern XChangeActivePointerGrab(
  2037. #if NeedFunctionPrototypes
  2038.     Display*        /* display */,
  2039.     unsigned int    /* event_mask */,
  2040.     Cursor        /* cursor */,
  2041.     Time        /* time */
  2042. #endif
  2043. );
  2044.  
  2045. extern XChangeGC(
  2046. #if NeedFunctionPrototypes
  2047.     Display*        /* display */,
  2048.     GC            /* gc */,
  2049.     unsigned long    /* valuemask */,
  2050.     XGCValues*        /* values */
  2051. #endif
  2052. );
  2053.  
  2054. extern XChangeKeyboardControl(
  2055. #if NeedFunctionPrototypes
  2056.     Display*        /* display */,
  2057.     unsigned long    /* value_mask */,
  2058.     XKeyboardControl*    /* values */
  2059. #endif
  2060. );
  2061.  
  2062. extern XChangeKeyboardMapping(
  2063. #if NeedFunctionPrototypes
  2064.     Display*        /* display */,
  2065.     int            /* first_keycode */,
  2066.     int            /* keysyms_per_keycode */,
  2067.     KeySym*        /* keysyms */,
  2068.     int            /* num_codes */
  2069. #endif
  2070. );
  2071.  
  2072. extern XChangePointerControl(
  2073. #if NeedFunctionPrototypes
  2074.     Display*        /* display */,
  2075.     Bool        /* do_accel */,
  2076.     Bool        /* do_threshold */,
  2077.     int            /* accel_numerator */,
  2078.     int            /* accel_denominator */,
  2079.     int            /* threshold */
  2080. #endif
  2081. );
  2082.  
  2083. extern XChangeProperty(
  2084. #if NeedFunctionPrototypes
  2085.     Display*        /* display */,
  2086.     Window        /* w */,
  2087.     Atom        /* property */,
  2088.     Atom        /* type */,
  2089.     int            /* format */,
  2090.     int            /* mode */,
  2091.      unsigned char*    /* data */,
  2092.     int            /* nelements */
  2093. #endif
  2094. );
  2095.  
  2096. extern XChangeSaveSet(
  2097. #if NeedFunctionPrototypes
  2098.     Display*        /* display */,
  2099.     Window        /* w */,
  2100.     int            /* change_mode */
  2101. #endif
  2102. );
  2103.  
  2104. extern XChangeWindowAttributes(
  2105. #if NeedFunctionPrototypes
  2106.     Display*        /* display */,
  2107.     Window        /* w */,
  2108.     unsigned long    /* valuemask */,
  2109.     XSetWindowAttributes* /* attributes */
  2110. #endif
  2111. );
  2112.  
  2113. /*
  2114. extern Bool XCheckIfEvent(
  2115. #if NeedFunctionPrototypes
  2116.     Display*        ,
  2117.     XEvent*        ,
  2118.     Bool (*) (
  2119. #if NeedNestedPrototypes
  2120.            Display*    ,
  2121.                XEvent*    ,
  2122.                XPointer    
  2123. #endif
  2124.              )        ,
  2125.     XPointer        
  2126. #endif
  2127. );
  2128. */
  2129.  
  2130. extern Bool XCheckMaskEvent(
  2131. #if NeedFunctionPrototypes
  2132.     Display*        /* display */,
  2133.     long        /* event_mask */,
  2134.     XEvent*        /* event_return */
  2135. #endif
  2136. );
  2137.  
  2138. extern Bool XCheckTypedEvent(
  2139. #if NeedFunctionPrototypes
  2140.     Display*        /* display */,
  2141.     int            /* event_type */,
  2142.     XEvent*        /* event_return */
  2143. #endif
  2144. );
  2145.  
  2146. extern Bool XCheckTypedWindowEvent(
  2147. #if NeedFunctionPrototypes
  2148.     Display*        /* display */,
  2149.     Window        /* w */,
  2150.     int            /* event_type */,
  2151.     XEvent*        /* event_return */
  2152. #endif
  2153. );
  2154.  
  2155. extern Bool XCheckWindowEvent(
  2156. #if NeedFunctionPrototypes
  2157.     Display*        /* display */,
  2158.     Window        /* w */,
  2159.     long        /* event_mask */,
  2160.     XEvent*        /* event_return */
  2161. #endif
  2162. );
  2163.  
  2164. extern XCirculateSubwindows(
  2165. #if NeedFunctionPrototypes
  2166.     Display*        /* display */,
  2167.     Window        /* w */,
  2168.     int            /* direction */
  2169. #endif
  2170. );
  2171.  
  2172. extern XCirculateSubwindowsDown(
  2173. #if NeedFunctionPrototypes
  2174.     Display*        /* display */,
  2175.     Window        /* w */
  2176. #endif
  2177. );
  2178.  
  2179. extern XCirculateSubwindowsUp(
  2180. #if NeedFunctionPrototypes
  2181.     Display*        /* display */,
  2182.     Window        /* w */
  2183. #endif
  2184. );
  2185.  
  2186. extern XClearArea(
  2187. #if NeedFunctionPrototypes
  2188.     Display*        /* display */,
  2189.     Window        /* w */,
  2190.     int            /* x */,
  2191.     int            /* y */,
  2192.     unsigned int    /* width */,
  2193.     unsigned int    /* height */,
  2194.     Bool        /* exposures */
  2195. #endif
  2196. );
  2197.  
  2198. extern XClearWindow(
  2199. #if NeedFunctionPrototypes
  2200.     Display*        /* display */,
  2201.     Window        /* w */
  2202. #endif
  2203. );
  2204.  
  2205. extern XCloseDisplay(
  2206. #if NeedFunctionPrototypes
  2207.     Display*        /* display */
  2208. #endif
  2209. );
  2210.  
  2211. extern XConfigureWindow(
  2212. #if NeedFunctionPrototypes
  2213.     Display*        /* display */,
  2214.     Window        /* w */,
  2215.     unsigned int    /* value_mask */,
  2216.     XWindowChanges*    /* values */         
  2217. #endif
  2218. );
  2219.  
  2220. extern int XConnectionNumber(
  2221. #if NeedFunctionPrototypes
  2222.     Display*        /* display */
  2223. #endif
  2224. );
  2225.  
  2226. extern XConvertSelection(
  2227. #if NeedFunctionPrototypes
  2228.     Display*        /* display */,
  2229.     Atom        /* selection */,
  2230.     Atom         /* target */,
  2231.     Atom        /* property */,
  2232.     Window        /* requestor */,
  2233.     Time        /* time */
  2234. #endif
  2235. );
  2236.  
  2237. extern XCopyArea(
  2238. #if NeedFunctionPrototypes
  2239.     Display*        /* display */,
  2240.     Drawable        /* src */,
  2241.     Drawable        /* dest */,
  2242.     GC            /* gc */,
  2243.     int            /* src_x */,
  2244.     int            /* src_y */,
  2245.     unsigned int    /* width */,
  2246.     unsigned int    /* height */,
  2247.     int            /* dest_x */,
  2248.     int            /* dest_y */
  2249. #endif
  2250. );
  2251.  
  2252. extern XCopyGC(
  2253. #if NeedFunctionPrototypes
  2254.     Display*        /* display */,
  2255.     GC            /* src */,
  2256.     unsigned long    /* valuemask */,
  2257.     GC            /* dest */
  2258. #endif
  2259. );
  2260.  
  2261. extern XCopyPlane(
  2262. #if NeedFunctionPrototypes
  2263.     Display*        /* display */,
  2264.     Drawable        /* src */,
  2265.     Drawable        /* dest */,
  2266.     GC            /* gc */,
  2267.     int            /* src_x */,
  2268.     int            /* src_y */,
  2269.     unsigned int    /* width */,
  2270.     unsigned int    /* height */,
  2271.     int            /* dest_x */,
  2272.     int            /* dest_y */,
  2273.     unsigned long    /* plane */
  2274. #endif
  2275. );
  2276.  
  2277. extern int XDefaultDepth(
  2278. #if NeedFunctionPrototypes
  2279.     Display*        /* display */,
  2280.     int            /* screen_number */
  2281. #endif
  2282. );
  2283.  
  2284. extern int XDefaultDepthOfScreen(
  2285. #if NeedFunctionPrototypes
  2286.     Screen*        /* screen */
  2287. #endif
  2288. );
  2289.  
  2290. extern int XDefaultScreen(
  2291. #if NeedFunctionPrototypes
  2292.     Display*        /* display */
  2293. #endif
  2294. );
  2295.  
  2296. extern XDefineCursor(
  2297. #if NeedFunctionPrototypes
  2298.     Display*        /* display */,
  2299.     Window        /* w */,
  2300.     Cursor        /* cursor */
  2301. #endif
  2302. );
  2303.  
  2304. extern XDeleteProperty(
  2305. #if NeedFunctionPrototypes
  2306.     Display*        /* display */,
  2307.     Window        /* w */,
  2308.     Atom        /* property */
  2309. #endif
  2310. );
  2311.  
  2312. extern XDestroyWindow(
  2313. #if NeedFunctionPrototypes
  2314.     Display*        /* display */,
  2315.     Window        /* w */
  2316. #endif
  2317. );
  2318.  
  2319. extern XDestroySubwindows(
  2320. #if NeedFunctionPrototypes
  2321.     Display*        /* display */,
  2322.     Window        /* w */
  2323. #endif
  2324. );
  2325.  
  2326. extern int XDoesBackingStore(
  2327. #if NeedFunctionPrototypes
  2328.     Screen*        /* screen */    
  2329. #endif
  2330. );
  2331.  
  2332. extern Bool XDoesSaveUnders(
  2333. #if NeedFunctionPrototypes
  2334.     Screen*        /* screen */
  2335. #endif
  2336. );
  2337.  
  2338. extern XDisableAccessControl(
  2339. #if NeedFunctionPrototypes
  2340.     Display*        /* display */
  2341. #endif
  2342. );
  2343.  
  2344.  
  2345. extern int XDisplayCells(
  2346. #if NeedFunctionPrototypes
  2347.     Display*        /* display */,
  2348.     int            /* screen_number */
  2349. #endif
  2350. );
  2351.  
  2352. extern int XDisplayHeight(
  2353. #if NeedFunctionPrototypes
  2354.     Display*        /* display */,
  2355.     int            /* screen_number */
  2356. #endif
  2357. );
  2358.  
  2359. extern int XDisplayHeightMM(
  2360. #if NeedFunctionPrototypes
  2361.     Display*        /* display */,
  2362.     int            /* screen_number */
  2363. #endif
  2364. );
  2365.  
  2366. extern XDisplayKeycodes(
  2367. #if NeedFunctionPrototypes
  2368.     Display*        /* display */,
  2369.     int*        /* min_keycodes_return */,
  2370.     int*        /* max_keycodes_return */
  2371. #endif
  2372. );
  2373.  
  2374. extern int XDisplayPlanes(
  2375. #if NeedFunctionPrototypes
  2376.     Display*        /* display */,
  2377.     int            /* screen_number */
  2378. #endif
  2379. );
  2380.  
  2381. extern int XDisplayWidth(
  2382. #if NeedFunctionPrototypes
  2383.     Display*        /* display */,
  2384.     int            /* screen_number */
  2385. #endif
  2386. );
  2387.  
  2388. extern int XDisplayWidthMM(
  2389. #if NeedFunctionPrototypes
  2390.     Display*        /* display */,
  2391.     int            /* screen_number */
  2392. #endif
  2393. );
  2394.  
  2395. extern XDrawArc(
  2396. #if NeedFunctionPrototypes
  2397.     Display*        /* display */,
  2398.     Drawable        /* d */,
  2399.     GC            /* gc */,
  2400.     int            /* x */,
  2401.     int            /* y */,
  2402.     unsigned int    /* width */,
  2403.     unsigned int    /* height */,
  2404.     int            /* angle1 */,
  2405.     int            /* angle2 */
  2406. #endif
  2407. );
  2408.  
  2409. extern XDrawArcs(
  2410. #if NeedFunctionPrototypes
  2411.     Display*        /* display */,
  2412.     Drawable        /* d */,
  2413.     GC            /* gc */,
  2414.     XArc*        /* arcs */,
  2415.     int            /* narcs */
  2416. #endif
  2417. );
  2418.  
  2419. extern XDrawImageString(
  2420. #if NeedFunctionPrototypes
  2421.     Display*        /* display */,
  2422.     Drawable        /* d */,
  2423.     GC            /* gc */,
  2424.     int            /* x */,
  2425.     int            /* y */,
  2426.     char*    /* string */,
  2427.     int            /* length */
  2428. #endif
  2429. );
  2430.  
  2431. extern XDrawImageString16(
  2432. #if NeedFunctionPrototypes
  2433.     Display*        /* display */,
  2434.     Drawable        /* d */,
  2435.     GC            /* gc */,
  2436.     int            /* x */,
  2437.     int            /* y */,
  2438.     char*    /* string */,
  2439.     int            /* length */
  2440. #endif
  2441. );
  2442.  
  2443. extern XDrawLine(
  2444. #if NeedFunctionPrototypes
  2445.     Display*        /* display */,
  2446.     Drawable        /* d */,
  2447.     GC            /* gc */,
  2448.     int            /* x1 */,
  2449.     int            /* x2 */,
  2450.     int            /* y1 */,
  2451.     int            /* y2 */
  2452. #endif
  2453. );
  2454.  
  2455. extern XDrawLines(
  2456. #if NeedFunctionPrototypes
  2457.     Display*        /* display */,
  2458.     Drawable        /* d */,
  2459.     GC            /* gc */,
  2460.     XPoint*        /* points */,
  2461.     int            /* npoints */,
  2462.     int            /* mode */
  2463. #endif
  2464. );
  2465.  
  2466. extern XDrawPoint(
  2467. #if NeedFunctionPrototypes
  2468.     Display*        /* display */,
  2469.     Drawable        /* d */,
  2470.     GC            /* gc */,
  2471.     int            /* x */,
  2472.     int            /* y */
  2473. #endif
  2474. );
  2475.  
  2476. extern XDrawPoints(
  2477. #if NeedFunctionPrototypes
  2478.     Display*        /* display */,
  2479.     Drawable        /* d */,
  2480.     GC            /* gc */,
  2481.     XPoint*        /* points */,
  2482.     int            /* npoints */,
  2483.     int            /* mode */
  2484. #endif
  2485. );
  2486.  
  2487. extern XDrawRectangle(
  2488. #if NeedFunctionPrototypes
  2489.     Display*        /* display */,
  2490.     Drawable        /* d */,
  2491.     GC            /* gc */,
  2492.     int            /* x */,
  2493.     int            /* y */,
  2494.     unsigned int    /* width */,
  2495.     unsigned int    /* height */
  2496. #endif
  2497. );
  2498.  
  2499. extern XDrawRectangles(
  2500. #if NeedFunctionPrototypes
  2501.     Display*        /* display */,
  2502.     Drawable        /* d */,
  2503.     GC            /* gc */,
  2504.     XRectangle*        /* rectangles */,
  2505.     int            /* nrectangles */
  2506. #endif
  2507. );
  2508.  
  2509. extern XDrawSegments(
  2510. #if NeedFunctionPrototypes
  2511.     Display*        /* display */,
  2512.     Drawable        /* d */,
  2513.     GC            /* gc */,
  2514.     XSegment*        /* segments */,
  2515.     int            /* nsegments */
  2516. #endif
  2517. );
  2518.  
  2519. extern XDrawString(
  2520. #if NeedFunctionPrototypes
  2521.     Display*        /* display */,
  2522.     Drawable        /* d */,
  2523.     GC            /* gc */,
  2524.     int            /* x */,
  2525.     int            /* y */,
  2526.     char*    /* string */,
  2527.     int            /* length */
  2528. #endif
  2529. );
  2530.  
  2531. extern XDrawString16(
  2532. #if NeedFunctionPrototypes
  2533.     Display*        /* display */,
  2534.     Drawable        /* d */,
  2535.     GC            /* gc */,
  2536.     int            /* x */,
  2537.     int            /* y */,
  2538.     char*    /* string */,
  2539.     int            /* length */
  2540. #endif
  2541. );
  2542.  
  2543. extern XDrawText(
  2544. #if NeedFunctionPrototypes
  2545.     Display*        /* display */,
  2546.     Drawable        /* d */,
  2547.     GC            /* gc */,
  2548.     int            /* x */,
  2549.     int            /* y */,
  2550.     XTextItem*        /* items */,
  2551.     int            /* nitems */
  2552. #endif
  2553. );
  2554.  
  2555. extern XDrawText16(
  2556. #if NeedFunctionPrototypes
  2557.     Display*        /* display */,
  2558.     Drawable        /* d */,
  2559.     GC            /* gc */,
  2560.     int            /* x */,
  2561.     int            /* y */,
  2562.     XTextItem16*    /* items */,
  2563.     int            /* nitems */
  2564. #endif
  2565. );
  2566.  
  2567. extern XEnableAccessControl(
  2568. #if NeedFunctionPrototypes
  2569.     Display*        /* display */
  2570. #endif
  2571. );
  2572.  
  2573. extern int XEventsQueued(
  2574. #if NeedFunctionPrototypes
  2575.     Display*        /* display */,
  2576.     int            /* mode */
  2577. #endif
  2578. );
  2579.  
  2580. extern Status XFetchName(
  2581. #if NeedFunctionPrototypes
  2582.     Display*        /* display */,
  2583.     Window        /* w */,
  2584.     char**        /* window_name_return */
  2585. #endif
  2586. );
  2587.  
  2588. extern XFillArc(
  2589. #if NeedFunctionPrototypes
  2590.     Display*        /* display */,
  2591.     Drawable        /* d */,
  2592.     GC            /* gc */,
  2593.     int            /* x */,
  2594.     int            /* y */,
  2595.     unsigned int    /* width */,
  2596.     unsigned int    /* height */,
  2597.     int            /* angle1 */,
  2598.     int            /* angle2 */
  2599. #endif
  2600. );
  2601.  
  2602. extern XFillArcs(
  2603. #if NeedFunctionPrototypes
  2604.     Display*        /* display */,
  2605.     Drawable        /* d */,
  2606.     GC            /* gc */,
  2607.     XArc*        /* arcs */,
  2608.     int            /* narcs */
  2609. #endif
  2610. );
  2611.  
  2612. extern XFillPolygon(
  2613. #if NeedFunctionPrototypes
  2614.     Display*        /* display */,
  2615.     Drawable        /* d */,
  2616.     GC            /* gc */,
  2617.     XPoint*        /* points */,
  2618.     int            /* npoints */,
  2619.     int            /* shape */,
  2620.     int            /* mode */
  2621. #endif
  2622. );
  2623.  
  2624. extern XFillRectangle(
  2625. #if NeedFunctionPrototypes
  2626.     Display*        /* display */,
  2627.     Drawable        /* d */,
  2628.     GC            /* gc */,
  2629.     int            /* x */,
  2630.     int            /* y */,
  2631.     unsigned int    /* width */,
  2632.     unsigned int    /* height */
  2633. #endif
  2634. );
  2635.  
  2636. extern XFillRectangles(
  2637. #if NeedFunctionPrototypes
  2638.     Display*        /* display */,
  2639.     Drawable        /* d */,
  2640.     GC            /* gc */,
  2641.     XRectangle*        /* rectangles */,
  2642.     int            /* nrectangles */
  2643. #endif
  2644. );
  2645.  
  2646. extern XFlush(
  2647. #if NeedFunctionPrototypes
  2648.     Display*        /* display */
  2649. #endif
  2650. );
  2651.  
  2652. extern XForceScreenSaver(
  2653. #if NeedFunctionPrototypes
  2654.     Display*        /* display */,
  2655.     int            /* mode */
  2656. #endif
  2657. );
  2658.  
  2659. extern XFree(
  2660. #if NeedFunctionPrototypes
  2661.     void*        /* data */
  2662. #endif
  2663. );
  2664.  
  2665. extern XFreeColormap(
  2666. #if NeedFunctionPrototypes
  2667.     Display*        /* display */,
  2668.     Colormap        /* colormap */
  2669. #endif
  2670. );
  2671.  
  2672. extern XFreeColors(
  2673. #if NeedFunctionPrototypes
  2674.     Display*        /* display */,
  2675.     Colormap        /* colormap */,
  2676.     unsigned long*    /* pixels */,
  2677.     int            /* npixels */,
  2678.     unsigned long    /* planes */
  2679. #endif
  2680. );
  2681.  
  2682. extern XFreeCursor(
  2683. #if NeedFunctionPrototypes
  2684.     Display*        /* display */,
  2685.     Cursor        /* cursor */
  2686. #endif
  2687. );
  2688.  
  2689. extern XFreeExtensionList(
  2690. #if NeedFunctionPrototypes
  2691.     char**        /* list */    
  2692. #endif
  2693. );
  2694.  
  2695. extern XFreeFont(
  2696. #if NeedFunctionPrototypes
  2697.     Display*        /* display */,
  2698.     XFontStruct*    /* font_struct */
  2699. #endif
  2700. );
  2701.  
  2702. extern XFreeFontInfo(
  2703. #if NeedFunctionPrototypes
  2704.     char**        /* names */,
  2705.     XFontStruct*    /* free_info */,
  2706.     int            /* actual_count */
  2707. #endif
  2708. );
  2709.  
  2710. extern XFreeFontNames(
  2711. #if NeedFunctionPrototypes
  2712.     char**        /* list */
  2713. #endif
  2714. );
  2715.  
  2716. extern XFreeFontPath(
  2717. #if NeedFunctionPrototypes
  2718.     char**        /* list */
  2719. #endif
  2720. );
  2721.  
  2722. extern XFreeGC(
  2723. #if NeedFunctionPrototypes
  2724.     Display*        /* display */,
  2725.     GC            /* gc */
  2726. #endif
  2727. );
  2728.  
  2729. extern XFreeModifiermap(
  2730. #if NeedFunctionPrototypes
  2731.     XModifierKeymap*    /* modmap */
  2732. #endif
  2733. );
  2734.  
  2735. extern XFreePixmap(
  2736. #if NeedFunctionPrototypes
  2737.     Display*        /* display */,
  2738.     Pixmap        /* pixmap */
  2739. #endif
  2740. );
  2741.  
  2742. extern int XGeometry(
  2743. #if NeedFunctionPrototypes
  2744.     Display*        /* display */,
  2745.     int            /* screen */,
  2746.      char*    /* position */,
  2747.      char*    /* default_position */,
  2748.     unsigned int    /* bwidth */,
  2749.     unsigned int    /* fwidth */,
  2750.     unsigned int    /* fheight */,
  2751.     int            /* xadder */,
  2752.     int            /* yadder */,
  2753.     int*        /* x_return */,
  2754.     int*        /* y_return */,
  2755.     int*        /* width_return */,
  2756.     int*        /* height_return */
  2757. #endif
  2758. );
  2759.  
  2760. extern XGetErrorDatabaseText(
  2761. #if NeedFunctionPrototypes
  2762.     Display*        /* display */,
  2763.      char*    /* name */,
  2764.      char*    /* message */,
  2765.      char*    /* default_string */,
  2766.     char*        /* buffer_return */,
  2767.     int            /* length */
  2768. #endif
  2769. );
  2770.  
  2771. extern XGetErrorText(
  2772. #if NeedFunctionPrototypes
  2773.     Display*        /* display */,
  2774.     int            /* code */,
  2775.     char*        /* buffer_return */,
  2776.     int            /* length */
  2777. #endif
  2778. );
  2779.  
  2780. extern Bool XGetFontProperty(
  2781. #if NeedFunctionPrototypes
  2782.     XFontStruct*    /* font_struct */,
  2783.     Atom        /* atom */,
  2784.     unsigned long*    /* value_return */
  2785. #endif
  2786. );
  2787.  
  2788. extern Status XGetGCValues(
  2789. #if NeedFunctionPrototypes
  2790.     Display*        /* display */,
  2791.     GC            /* gc */,
  2792.     unsigned long    /* valuemask */,
  2793.     XGCValues*        /* values_return */
  2794. #endif
  2795. );
  2796.  
  2797. extern Status XGetGeometry(
  2798. #if NeedFunctionPrototypes
  2799.     Display*        /* display */,
  2800.     Drawable        /* d */,
  2801.     Window*        /* root_return */,
  2802.     int*        /* x_return */,
  2803.     int*        /* y_return */,
  2804.     unsigned int*    /* width_return */,
  2805.     unsigned int*    /* height_return */,
  2806.     unsigned int*    /* border_width_return */,
  2807.     unsigned int*    /* depth_return */
  2808. #endif
  2809. );
  2810.  
  2811. extern Status XGetIconName(
  2812. #if NeedFunctionPrototypes
  2813.     Display*        /* display */,
  2814.     Window        /* w */,
  2815.     char**        /* icon_name_return */
  2816. #endif
  2817. );
  2818.  
  2819. extern XGetInputFocus(
  2820. #if NeedFunctionPrototypes
  2821.     Display*        /* display */,
  2822.     Window*        /* focus_return */,
  2823.     int*        /* revert_to_return */
  2824. #endif
  2825. );
  2826.  
  2827. extern XGetKeyboardControl(
  2828. #if NeedFunctionPrototypes
  2829.     Display*        /* display */,
  2830.     XKeyboardState*    /* values_return */
  2831. #endif
  2832. );
  2833.  
  2834. extern XGetPointerControl(
  2835. #if NeedFunctionPrototypes
  2836.     Display*        /* display */,
  2837.     int*        /* accel_numerator_return */,
  2838.     int*        /* accel_denominator_return */,
  2839.     int*        /* threshold_return */
  2840. #endif
  2841. );
  2842.  
  2843. extern int XGetPointerMapping(
  2844. #if NeedFunctionPrototypes
  2845.     Display*        /* display */,
  2846.     unsigned char*    /* map_return */,
  2847.     int            /* nmap */
  2848. #endif
  2849. );
  2850.  
  2851. extern XGetScreenSaver(
  2852. #if NeedFunctionPrototypes
  2853.     Display*        /* display */,
  2854.     int*        /* timeout_return */,
  2855.     int*        /* interval_return */,
  2856.     int*        /* prefer_blanking_return */,
  2857.     int*        /* allow_exposures_return */
  2858. #endif
  2859. );
  2860.  
  2861. extern Status XGetTransientForHint(
  2862. #if NeedFunctionPrototypes
  2863.     Display*        /* display */,
  2864.     Window        /* w */,
  2865.     Window*        /* prop_window_return */
  2866. #endif
  2867. );
  2868.  
  2869. extern int XGetWindowProperty(
  2870. #if NeedFunctionPrototypes
  2871.     Display*        /* display */,
  2872.     Window        /* w */,
  2873.     Atom        /* property */,
  2874.     long        /* long_offset */,
  2875.     long        /* long_length */,
  2876.     Bool        /* delete */,
  2877.     Atom        /* req_type */,
  2878.     Atom*        /* actual_type_return */,
  2879.     int*        /* actual_format_return */,
  2880.     unsigned long*    /* nitems_return */,
  2881.     unsigned long*    /* bytes_after_return */,
  2882.     unsigned char**    /* prop_return */
  2883. #endif
  2884. );
  2885.  
  2886. extern Status XGetWindowAttributes(
  2887. #if NeedFunctionPrototypes
  2888.     Display*        /* display */,
  2889.     Window        /* w */,
  2890.     XWindowAttributes*    /* window_attributes_return */
  2891. #endif
  2892. );
  2893.  
  2894. extern XGrabButton(
  2895. #if NeedFunctionPrototypes
  2896.     Display*        /* display */,
  2897.     unsigned int    /* button */,
  2898.     unsigned int    /* modifiers */,
  2899.     Window        /* grab_window */,
  2900.     Bool        /* owner_events */,
  2901.     unsigned int    /* event_mask */,
  2902.     int            /* pointer_mode */,
  2903.     int            /* keyboard_mode */,
  2904.     Window        /* confine_to */,
  2905.     Cursor        /* cursor */
  2906. #endif
  2907. );
  2908.  
  2909. extern XGrabKey(
  2910. #if NeedFunctionPrototypes
  2911.     Display*        /* display */,
  2912.     int            /* keycode */,
  2913.     unsigned int    /* modifiers */,
  2914.     Window        /* grab_window */,
  2915.     Bool        /* owner_events */,
  2916.     int            /* pointer_mode */,
  2917.     int            /* keyboard_mode */
  2918. #endif
  2919. );
  2920.  
  2921. extern int XGrabKeyboard(
  2922. #if NeedFunctionPrototypes
  2923.     Display*        /* display */,
  2924.     Window        /* grab_window */,
  2925.     Bool        /* owner_events */,
  2926.     int            /* pointer_mode */,
  2927.     int            /* keyboard_mode */,
  2928.     Time        /* time */
  2929. #endif
  2930. );
  2931.  
  2932. extern int XGrabPointer(
  2933. #if NeedFunctionPrototypes
  2934.     Display*        /* display */,
  2935.     Window        /* grab_window */,
  2936.     Bool        /* owner_events */,
  2937.     unsigned int    /* event_mask */,
  2938.     int            /* pointer_mode */,
  2939.     int            /* keyboard_mode */,
  2940.     Window        /* confine_to */,
  2941.     Cursor        /* cursor */,
  2942.     Time        /* time */
  2943. #endif
  2944. );
  2945.  
  2946. extern XGrabServer(
  2947. #if NeedFunctionPrototypes
  2948.     Display*        /* display */
  2949. #endif
  2950. );
  2951.  
  2952. extern int XHeightMMOfScreen(
  2953. #if NeedFunctionPrototypes
  2954.     Screen*        /* screen */
  2955. #endif
  2956. );
  2957.  
  2958. extern int XHeightOfScreen(
  2959. #if NeedFunctionPrototypes
  2960.     Screen*        /* screen */
  2961. #endif
  2962. );
  2963.  
  2964. /*
  2965. extern XIfEvent(
  2966. #if NeedFunctionPrototypes
  2967.     Display*        ,
  2968.     XEvent*        ,
  2969.     Bool (*) (
  2970. #if NeedNestedPrototypes
  2971.            Display*        ,
  2972.                XEvent*        ,
  2973.                XPointer            
  2974. #endif
  2975.              )        ,
  2976.     XPointer    
  2977. #endif
  2978. );
  2979. */
  2980.  
  2981. extern int XImageByteOrder(
  2982. #if NeedFunctionPrototypes
  2983.     Display*        /* display */
  2984. #endif
  2985. );
  2986.  
  2987. extern XInstallColormap(
  2988. #if NeedFunctionPrototypes
  2989.     Display*        /* display */,
  2990.     Colormap        /* colormap */
  2991. #endif
  2992. );
  2993.  
  2994. extern KeyCode XKeysymToKeycode(
  2995. #if NeedFunctionPrototypes
  2996.     Display*        /* display */,
  2997.     KeySym        /* keysym */
  2998. #endif
  2999. );
  3000.  
  3001. extern XKillClient(
  3002. #if NeedFunctionPrototypes
  3003.     Display*        /* display */,
  3004.     XID            /* resource */
  3005. #endif
  3006. );
  3007.  
  3008. extern unsigned long XLastKnownRequestProcessed(
  3009. #if NeedFunctionPrototypes
  3010.     Display*        /* display */
  3011. #endif
  3012. );
  3013.  
  3014. extern Status XLookupColor(
  3015. #if NeedFunctionPrototypes
  3016.     Display*        /* display */,
  3017.     Colormap        /* colormap */,
  3018.     char*    /* color_name */,
  3019.     XColor*        /* exact_def_return */,
  3020.     XColor*        /* screen_def_return */
  3021. #endif
  3022. );
  3023.  
  3024. extern XLowerWindow(
  3025. #if NeedFunctionPrototypes
  3026.     Display*        /* display */,
  3027.     Window        /* w */
  3028. #endif
  3029. );
  3030.  
  3031. extern XMapRaised(
  3032. #if NeedFunctionPrototypes
  3033.     Display*        /* display */,
  3034.     Window        /* w */
  3035. #endif
  3036. );
  3037.  
  3038. extern XMapSubwindows(
  3039. #if NeedFunctionPrototypes
  3040.     Display*        /* display */,
  3041.     Window        /* w */
  3042. #endif
  3043. );
  3044.  
  3045. extern XMapWindow(
  3046. #if NeedFunctionPrototypes
  3047.     Display*        /* display */,
  3048.     Window        /* w */
  3049. #endif
  3050. );
  3051.  
  3052. extern XMaskEvent(
  3053. #if NeedFunctionPrototypes
  3054.     Display*        /* display */,
  3055.     long        /* event_mask */,
  3056.     XEvent*        /* event_return */
  3057. #endif
  3058. );
  3059.  
  3060. extern int XMaxCmapsOfScreen(
  3061. #if NeedFunctionPrototypes
  3062.     Screen*        /* screen */
  3063. #endif
  3064. );
  3065.  
  3066. extern int XMinCmapsOfScreen(
  3067. #if NeedFunctionPrototypes
  3068.     Screen*        /* screen */
  3069. #endif
  3070. );
  3071.  
  3072. extern XMoveResizeWindow(
  3073. #if NeedFunctionPrototypes
  3074.     Display*        /* display */,
  3075.     Window        /* w */,
  3076.     int            /* x */,
  3077.     int            /* y */,
  3078.     unsigned int    /* width */,
  3079.     unsigned int    /* height */
  3080. #endif
  3081. );
  3082.  
  3083. extern XMoveWindow(
  3084. #if NeedFunctionPrototypes
  3085.     Display*        /* display */,
  3086.     Window        /* w */,
  3087.     int            /* x */,
  3088.     int            /* y */
  3089. #endif
  3090. );
  3091.  
  3092. extern XNextEvent(
  3093. #if NeedFunctionPrototypes
  3094.     Display*        /* display */,
  3095.     XEvent*        /* event_return */
  3096. #endif
  3097. );
  3098.  
  3099. extern XNoOp(
  3100. #if NeedFunctionPrototypes
  3101.     Display*        /* display */
  3102. #endif
  3103. );
  3104.  
  3105. extern Status XParseColor(
  3106. #if NeedFunctionPrototypes
  3107.     Display*        /* display */,
  3108.     Colormap        /* colormap */,
  3109.     char*    /* spec */,
  3110.     XColor*        /* exact_def_return */
  3111. #endif
  3112. );
  3113.  
  3114. extern int XParseGeometry(
  3115. #if NeedFunctionPrototypes
  3116.     char*    /* parsestring */,
  3117.     int*        /* x_return */,
  3118.     int*        /* y_return */,
  3119.     unsigned int*    /* width_return */,
  3120.     unsigned int*    /* height_return */
  3121. #endif
  3122. );
  3123.  
  3124. extern XPeekEvent(
  3125. #if NeedFunctionPrototypes
  3126.     Display*        /* display */,
  3127.     XEvent*        /* event_return */
  3128. #endif
  3129. );
  3130.  
  3131. /*
  3132. extern XPeekIfEvent(
  3133. #if NeedFunctionPrototypes
  3134.     Display*        ,
  3135.     XEvent*        ,
  3136.     Bool (*) (
  3137. #if NeedNestedPrototypes
  3138.            Display*    ,
  3139.                XEvent*        ,
  3140.                XPointer    
  3141. #endif
  3142.              )    ,
  3143.     XPointer    
  3144. #endif
  3145. );
  3146. */
  3147.  
  3148. extern int XPending(
  3149. #if NeedFunctionPrototypes
  3150.     Display*        /* display */
  3151. #endif
  3152. );
  3153.  
  3154. extern int XPlanesOfScreen(
  3155. #if NeedFunctionPrototypes
  3156.     Screen*        /* screen */
  3157.     
  3158. #endif
  3159. );
  3160.  
  3161. extern int XProtocolRevision(
  3162. #if NeedFunctionPrototypes
  3163.     Display*        /* display */
  3164. #endif
  3165. );
  3166.  
  3167. extern int XProtocolVersion(
  3168. #if NeedFunctionPrototypes
  3169.     Display*        /* display */
  3170. #endif
  3171. );
  3172.  
  3173.  
  3174. extern XPutBackEvent(
  3175. #if NeedFunctionPrototypes
  3176.     Display*        /* display */,
  3177.     XEvent*        /* event */
  3178. #endif
  3179. );
  3180.  
  3181. extern XPutImage(
  3182. #if NeedFunctionPrototypes
  3183.     Display*        /* display */,
  3184.     Drawable        /* d */,
  3185.     GC            /* gc */,
  3186.     XImage*        /* image */,
  3187.     int            /* src_x */,
  3188.     int            /* src_y */,
  3189.     int            /* dest_x */,
  3190.     int            /* dest_y */,
  3191.     unsigned int    /* width */,
  3192.     unsigned int    /* height */      
  3193. #endif
  3194. );
  3195.  
  3196. extern int XQLength(
  3197. #if NeedFunctionPrototypes
  3198.     Display*        /* display */
  3199. #endif
  3200. );
  3201.  
  3202. extern Status XQueryBestCursor(
  3203. #if NeedFunctionPrototypes
  3204.     Display*        /* display */,
  3205.     Drawable        /* d */,
  3206.     unsigned int        /* width */,
  3207.     unsigned int    /* height */,
  3208.     unsigned int*    /* width_return */,
  3209.     unsigned int*    /* height_return */
  3210. #endif
  3211. );
  3212.  
  3213. extern Status XQueryBestSize(
  3214. #if NeedFunctionPrototypes
  3215.     Display*        /* display */,
  3216.     int            /* class */,
  3217.     Drawable        /* which_screen */,
  3218.     unsigned int    /* width */,
  3219.     unsigned int    /* height */,
  3220.     unsigned int*    /* width_return */,
  3221.     unsigned int*    /* height_return */
  3222. #endif
  3223. );
  3224.  
  3225. extern Status XQueryBestStipple(
  3226. #if NeedFunctionPrototypes
  3227.     Display*        /* display */,
  3228.     Drawable        /* which_screen */,
  3229.     unsigned int    /* width */,
  3230.     unsigned int    /* height */,
  3231.     unsigned int*    /* width_return */,
  3232.     unsigned int*    /* height_return */
  3233. #endif
  3234. );
  3235.  
  3236. extern Status XQueryBestTile(
  3237. #if NeedFunctionPrototypes
  3238.     Display*        /* display */,
  3239.     Drawable        /* which_screen */,
  3240.     unsigned int    /* width */,
  3241.     unsigned int    /* height */,
  3242.     unsigned int*    /* width_return */,
  3243.     unsigned int*    /* height_return */
  3244. #endif
  3245. );
  3246.  
  3247. extern XQueryColor(
  3248. #if NeedFunctionPrototypes
  3249.     Display*        /* display */,
  3250.     Colormap        /* colormap */,
  3251.     XColor*        /* def_in_out */
  3252. #endif
  3253. );
  3254.  
  3255. extern XQueryColors(
  3256. #if NeedFunctionPrototypes
  3257.     Display*        /* display */,
  3258.     Colormap        /* colormap */,
  3259.     XColor*        /* defs_in_out */,
  3260.     int            /* ncolors */
  3261. #endif
  3262. );
  3263.  
  3264. extern Bool XQueryExtension(
  3265. #if NeedFunctionPrototypes
  3266.     Display*        /* display */,
  3267.      char*    /* name */,
  3268.     int*        /* major_opcode_return */,
  3269.     int*        /* first_event_return */,
  3270.     int*        /* first_error_return */
  3271. #endif
  3272. );
  3273.  
  3274. extern XQueryKeymap(
  3275. #if NeedFunctionPrototypes
  3276.     Display*        /* display */,
  3277.     char [32]        /* keys_return */
  3278. #endif
  3279. );
  3280.  
  3281. extern Bool XQueryPointer(
  3282. #if NeedFunctionPrototypes
  3283.     Display*        /* display */,
  3284.     Window        /* w */,
  3285.     Window*        /* root_return */,
  3286.     Window*        /* child_return */,
  3287.     int*        /* root_x_return */,
  3288.     int*        /* root_y_return */,
  3289.     int*        /* win_x_return */,
  3290.     int*        /* win_y_return */,
  3291.     unsigned int*       /* mask_return */
  3292. #endif
  3293. );
  3294.  
  3295. extern XQueryTextExtents(
  3296. #if NeedFunctionPrototypes
  3297.     Display*        /* display */,
  3298.     XID            /* font_ID */,
  3299.      char*    /* string */,
  3300.     int            /* nchars */,
  3301.     int*        /* direction_return */,
  3302.     int*        /* font_ascent_return */,
  3303.     int*        /* font_descent_return */,
  3304.     XCharStruct*    /* overall_return */    
  3305. #endif
  3306. );
  3307.  
  3308. extern XQueryTextExtents16(
  3309. #if NeedFunctionPrototypes
  3310.     Display*        /* display */,
  3311.     XID            /* font_ID */,
  3312.      XChar2b*    /* string */,
  3313.     int            /* nchars */,
  3314.     int*        /* direction_return */,
  3315.     int*        /* font_ascent_return */,
  3316.     int*        /* font_descent_return */,
  3317.     XCharStruct*    /* overall_return */
  3318. #endif
  3319. );
  3320.  
  3321. extern Status XQueryTree(
  3322. #if NeedFunctionPrototypes
  3323.     Display*        /* display */,
  3324.     Window        /* w */,
  3325.     Window*        /* root_return */,
  3326.     Window*        /* parent_return */,
  3327.     Window**        /* children_return */,
  3328.     unsigned int*    /* nchildren_return */
  3329. #endif
  3330. );
  3331.  
  3332. extern XRaiseWindow(
  3333. #if NeedFunctionPrototypes
  3334.     Display*        /* display */,
  3335.     Window        /* w */
  3336. #endif
  3337. );
  3338.  
  3339. extern int XReadBitmapFile(
  3340. #if NeedFunctionPrototypes
  3341.     Display*        /* display */,
  3342.     Drawable         /* d */,
  3343.     char*    /* filename */,
  3344.     unsigned int*    /* width_return */,
  3345.     unsigned int*    /* height_return */,
  3346.     Pixmap*        /* bitmap_return */,
  3347.     int*        /* x_hot_return */,
  3348.     int*        /* y_hot_return */
  3349. #endif
  3350. );
  3351.  
  3352. extern XRebindKeysym(
  3353. #if NeedFunctionPrototypes
  3354.     Display*        /* display */,
  3355.     KeySym        /* keysym */,
  3356.     KeySym*        /* list */,
  3357.     int            /* mod_count */,
  3358.      unsigned char*    /* string */,
  3359.     int            /* bytes_string */
  3360. #endif
  3361. );
  3362.  
  3363. extern XRecolorCursor(
  3364. #if NeedFunctionPrototypes
  3365.     Display*        /* display */,
  3366.     Cursor        /* cursor */,
  3367.     XColor*        /* foreground_color */,
  3368.     XColor*        /* background_color */
  3369. #endif
  3370. );
  3371.  
  3372. extern XRefreshKeyboardMapping(
  3373. #if NeedFunctionPrototypes
  3374.     XMappingEvent*    /* event_map */    
  3375. #endif
  3376. );
  3377.  
  3378. extern XRemoveFromSaveSet(
  3379. #if NeedFunctionPrototypes
  3380.     Display*        /* display */,
  3381.     Window        /* w */
  3382. #endif
  3383. );
  3384.  
  3385. extern XRemoveHost(
  3386. #if NeedFunctionPrototypes
  3387.     Display*        /* display */,
  3388.     XHostAddress*    /* host */
  3389. #endif
  3390. );
  3391.  
  3392. extern XRemoveHosts(
  3393. #if NeedFunctionPrototypes
  3394.     Display*        /* display */,
  3395.     XHostAddress*    /* hosts */,
  3396.     int            /* num_hosts */
  3397. #endif
  3398. );
  3399.  
  3400. extern XReparentWindow(
  3401. #if NeedFunctionPrototypes
  3402.     Display*        /* display */,
  3403.     Window        /* w */,
  3404.     Window        /* parent */,
  3405.     int            /* x */,
  3406.     int            /* y */
  3407. #endif
  3408. );
  3409.  
  3410. extern XResetScreenSaver(
  3411. #if NeedFunctionPrototypes
  3412.     Display*        /* display */
  3413. #endif
  3414. );
  3415.  
  3416. extern XResizeWindow(
  3417. #if NeedFunctionPrototypes
  3418.     Display*        /* display */,
  3419.     Window        /* w */,
  3420.     unsigned int    /* width */,
  3421.     unsigned int    /* height */
  3422. #endif
  3423. );
  3424.  
  3425. extern XRestackWindows(
  3426. #if NeedFunctionPrototypes
  3427.     Display*        /* display */,
  3428.     Window*        /* windows */,
  3429.     int            /* nwindows */
  3430. #endif
  3431. );
  3432.  
  3433. extern XRotateBuffers(
  3434. #if NeedFunctionPrototypes
  3435.     Display*        /* display */,
  3436.     int            /* rotate */
  3437. #endif
  3438. );
  3439.  
  3440. extern XRotateWindowProperties(
  3441. #if NeedFunctionPrototypes
  3442.     Display*        /* display */,
  3443.     Window        /* w */,
  3444.     Atom*        /* properties */,
  3445.     int            /* num_prop */,
  3446.     int            /* npositions */
  3447. #endif
  3448. );
  3449.  
  3450. extern int XScreenCount(
  3451. #if NeedFunctionPrototypes
  3452.     Display*        /* display */
  3453. #endif
  3454. );
  3455.  
  3456. extern XSelectInput(
  3457. #if NeedFunctionPrototypes
  3458.     Display*        /* display */,
  3459.     Window        /* w */,
  3460.     long        /* event_mask */
  3461. #endif
  3462. );
  3463.  
  3464. extern Status XSendEvent(
  3465. #if NeedFunctionPrototypes
  3466.     Display*        /* display */,
  3467.     Window        /* w */,
  3468.     Bool        /* propagate */,
  3469.     long        /* event_mask */,
  3470.     XEvent*        /* event_send */
  3471. #endif
  3472. );
  3473.  
  3474. extern XSetAccessControl(
  3475. #if NeedFunctionPrototypes
  3476.     Display*        /* display */,
  3477.     int            /* mode */
  3478. #endif
  3479. );
  3480.  
  3481. extern XSetArcMode(
  3482. #if NeedFunctionPrototypes
  3483.     Display*        /* display */,
  3484.     GC            /* gc */,
  3485.     int            /* arc_mode */
  3486. #endif
  3487. );
  3488.  
  3489. extern XSetBackground(
  3490. #if NeedFunctionPrototypes
  3491.     Display*        /* display */,
  3492.     GC            /* gc */,
  3493.     unsigned long    /* background */
  3494. #endif
  3495. );
  3496.  
  3497. extern XSetClipMask(
  3498. #if NeedFunctionPrototypes
  3499.     Display*        /* display */,
  3500.     GC            /* gc */,
  3501.     Pixmap        /* pixmap */
  3502. #endif
  3503. );
  3504.  
  3505. extern XSetClipOrigin(
  3506. #if NeedFunctionPrototypes
  3507.     Display*        /* display */,
  3508.     GC            /* gc */,
  3509.     int            /* clip_x_origin */,
  3510.     int            /* clip_y_origin */
  3511. #endif
  3512. );
  3513.  
  3514. extern XSetClipRectangles(
  3515. #if NeedFunctionPrototypes
  3516.     Display*        /* display */,
  3517.     GC            /* gc */,
  3518.     int            /* clip_x_origin */,
  3519.     int            /* clip_y_origin */,
  3520.     XRectangle*        /* rectangles */,
  3521.     int            /* n */,
  3522.     int            /* ordering */
  3523. #endif
  3524. );
  3525.  
  3526. extern XSetCloseDownMode(
  3527. #if NeedFunctionPrototypes
  3528.     Display*        /* display */,
  3529.     int            /* close_mode */
  3530. #endif
  3531. );
  3532.  
  3533. extern XSetCommand(
  3534. #if NeedFunctionPrototypes
  3535.     Display*        /* display */,
  3536.     Window        /* w */,
  3537.     char**        /* argv */,
  3538.     int            /* argc */
  3539. #endif
  3540. );
  3541.  
  3542. extern XSetDashes(
  3543. #if NeedFunctionPrototypes
  3544.     Display*        /* display */,
  3545.     GC            /* gc */,
  3546.     int            /* dash_offset */,
  3547.      char*    /* dash_list */,
  3548.     int            /* n */
  3549. #endif
  3550. );
  3551.  
  3552. extern XSetFillRule(
  3553. #if NeedFunctionPrototypes
  3554.     Display*        /* display */,
  3555.     GC            /* gc */,
  3556.     int            /* fill_rule */
  3557. #endif
  3558. );
  3559.  
  3560. extern XSetFillStyle(
  3561. #if NeedFunctionPrototypes
  3562.     Display*        /* display */,
  3563.     GC            /* gc */,
  3564.     int            /* fill_style */
  3565. #endif
  3566. );
  3567.  
  3568. extern XSetFont(
  3569. #if NeedFunctionPrototypes
  3570.     Display*        /* display */,
  3571.     GC            /* gc */,
  3572.     Font        /* font */
  3573. #endif
  3574. );
  3575.  
  3576. extern XSetFontPath(
  3577. #if NeedFunctionPrototypes
  3578.     Display*        /* display */,
  3579.     char**        /* directories */,
  3580.     int            /* ndirs */         
  3581. #endif
  3582. );
  3583.  
  3584. extern XSetForeground(
  3585. #if NeedFunctionPrototypes
  3586.     Display*        /* display */,
  3587.     GC            /* gc */,
  3588.     unsigned long    /* foreground */
  3589. #endif
  3590. );
  3591.  
  3592. extern XSetFunction(
  3593. #if NeedFunctionPrototypes
  3594.     Display*        /* display */,
  3595.     GC            /* gc */,
  3596.     int            /* function */
  3597. #endif
  3598. );
  3599.  
  3600. extern XSetGraphicsExposures(
  3601. #if NeedFunctionPrototypes
  3602.     Display*        /* display */,
  3603.     GC            /* gc */,
  3604.     Bool        /* graphics_exposures */
  3605. #endif
  3606. );
  3607.  
  3608. extern XSetIconName(
  3609. #if NeedFunctionPrototypes
  3610.     Display*        /* display */,
  3611.     Window        /* w */,
  3612.      char*    /* icon_name */
  3613. #endif
  3614. );
  3615.  
  3616. extern XSetInputFocus(
  3617. #if NeedFunctionPrototypes
  3618.     Display*        /* display */,
  3619.     Window        /* focus */,
  3620.     int            /* revert_to */,
  3621.     Time        /* time */
  3622. #endif
  3623. );
  3624.  
  3625. extern XSetLineAttributes(
  3626. #if NeedFunctionPrototypes
  3627.     Display*        /* display */,
  3628.     GC            /* gc */,
  3629.     unsigned int    /* line_width */,
  3630.     int            /* line_style */,
  3631.     int            /* cap_style */,
  3632.     int            /* join_style */
  3633. #endif
  3634. );
  3635.  
  3636. extern int XSetModifierMapping(
  3637. #if NeedFunctionPrototypes
  3638.     Display*        /* display */,
  3639.     XModifierKeymap*    /* modmap */
  3640. #endif
  3641. );
  3642.  
  3643. extern XSetPlaneMask(
  3644. #if NeedFunctionPrototypes
  3645.     Display*        /* display */,
  3646.     GC            /* gc */,
  3647.     unsigned long    /* plane_mask */
  3648. #endif
  3649. );
  3650.  
  3651. extern int XSetPointerMapping(
  3652. #if NeedFunctionPrototypes
  3653.     Display*        /* display */,
  3654.      unsigned char*    /* map */,
  3655.     int            /* nmap */
  3656. #endif
  3657. );
  3658.  
  3659. extern XSetScreenSaver(
  3660. #if NeedFunctionPrototypes
  3661.     Display*        /* display */,
  3662.     int            /* timeout */,
  3663.     int            /* interval */,
  3664.     int            /* prefer_blanking */,
  3665.     int            /* allow_exposures */
  3666. #endif
  3667. );
  3668.  
  3669. extern XSetSelectionOwner(
  3670. #if NeedFunctionPrototypes
  3671.     Display*        /* display */,
  3672.     Atom            /* selection */,
  3673.     Window        /* owner */,
  3674.     Time        /* time */
  3675. #endif
  3676. );
  3677.  
  3678. extern XSetState(
  3679. #if NeedFunctionPrototypes
  3680.     Display*        /* display */,
  3681.     GC            /* gc */,
  3682.     unsigned long     /* foreground */,
  3683.     unsigned long    /* background */,
  3684.     int            /* function */,
  3685.     unsigned long    /* plane_mask */
  3686. #endif
  3687. );
  3688.  
  3689. extern XSetStipple(
  3690. #if NeedFunctionPrototypes
  3691.     Display*        /* display */,
  3692.     GC            /* gc */,
  3693.     Pixmap        /* stipple */
  3694. #endif
  3695. );
  3696.  
  3697. extern XSetSubwindowMode(
  3698. #if NeedFunctionPrototypes
  3699.     Display*        /* display */,
  3700.     GC            /* gc */,
  3701.     int            /* subwindow_mode */
  3702. #endif
  3703. );
  3704.  
  3705. extern XSetTSOrigin(
  3706. #if NeedFunctionPrototypes
  3707.     Display*        /* display */,
  3708.     GC            /* gc */,
  3709.     int            /* ts_x_origin */,
  3710.     int            /* ts_y_origin */
  3711. #endif
  3712. );
  3713.  
  3714. extern XSetTile(
  3715. #if NeedFunctionPrototypes
  3716.     Display*        /* display */,
  3717.     GC            /* gc */,
  3718.     Pixmap        /* tile */
  3719. #endif
  3720. );
  3721.  
  3722. extern XSetWindowBackground(
  3723. #if NeedFunctionPrototypes
  3724.     Display*        /* display */,
  3725.     Window        /* w */,
  3726.     unsigned long    /* background_pixel */
  3727. #endif
  3728. );
  3729.  
  3730. extern XSetWindowBackgroundPixmap(
  3731. #if NeedFunctionPrototypes
  3732.     Display*        /* display */,
  3733.     Window        /* w */,
  3734.     Pixmap        /* background_pixmap */
  3735. #endif
  3736. );
  3737.  
  3738. extern XSetWindowBorder(
  3739. #if NeedFunctionPrototypes
  3740.     Display*        /* display */,
  3741.     Window        /* w */,
  3742.     unsigned long    /* border_pixel */
  3743. #endif
  3744. );
  3745.  
  3746. extern XSetWindowBorderPixmap(
  3747. #if NeedFunctionPrototypes
  3748.     Display*        /* display */,
  3749.     Window        /* w */,
  3750.     Pixmap        /* border_pixmap */
  3751. #endif
  3752. );
  3753.  
  3754. extern XSetWindowBorderWidth(
  3755. #if NeedFunctionPrototypes
  3756.     Display*        /* display */,
  3757.     Window        /* w */,
  3758.     unsigned int    /* width */
  3759. #endif
  3760. );
  3761.  
  3762. extern XSetWindowColormap(
  3763. #if NeedFunctionPrototypes
  3764.     Display*        /* display */,
  3765.     Window        /* w */,
  3766.     Colormap        /* colormap */
  3767. #endif
  3768. );
  3769.  
  3770. extern XStoreBuffer(
  3771. #if NeedFunctionPrototypes
  3772.     Display*        /* display */,
  3773.      char*    /* bytes */,
  3774.     int            /* nbytes */,
  3775.     int            /* buffer */
  3776. #endif
  3777. );
  3778.  
  3779. extern XStoreBytes(
  3780. #if NeedFunctionPrototypes
  3781.     Display*        /* display */,
  3782.      char*    /* bytes */,
  3783.     int            /* nbytes */
  3784. #endif
  3785. );
  3786.  
  3787. extern XStoreColor(
  3788. #if NeedFunctionPrototypes
  3789.     Display*        /* display */,
  3790.     Colormap        /* colormap */,
  3791.     XColor*        /* color */
  3792. #endif
  3793. );
  3794.  
  3795. extern XStoreColors(
  3796. #if NeedFunctionPrototypes
  3797.     Display*        /* display */,
  3798.     Colormap        /* colormap */,
  3799.     XColor*        /* color */,
  3800.     int            /* ncolors */
  3801. #endif
  3802. );
  3803.  
  3804. extern XStoreName(
  3805. #if NeedFunctionPrototypes
  3806.     Display*        /* display */,
  3807.     Window        /* w */,
  3808.     char*    /* window_name */
  3809. #endif
  3810. );
  3811.  
  3812. extern XStoreNamedColor(
  3813. #if NeedFunctionPrototypes
  3814.     Display*        /* display */,
  3815.     Colormap        /* colormap */,
  3816.     char*    /* color */,
  3817.     unsigned long    /* pixel */,
  3818.     int            /* flags */
  3819. #endif
  3820. );
  3821.  
  3822. extern XSync(
  3823. #if NeedFunctionPrototypes
  3824.     Display*        /* display */,
  3825.     Bool        /* discard */
  3826. #endif
  3827. );
  3828.  
  3829. extern XTextExtents(
  3830. #if NeedFunctionPrototypes
  3831.     XFontStruct*    /* font_struct */,
  3832.     char*    /* string */,
  3833.     int            /* nchars */,
  3834.     int*        /* direction_return */,
  3835.     int*        /* font_ascent_return */,
  3836.     int*        /* font_descent_return */,
  3837.     XCharStruct*    /* overall_return */
  3838. #endif
  3839. );
  3840.  
  3841. extern XTextExtents16(
  3842. #if NeedFunctionPrototypes
  3843.     XFontStruct*    /* font_struct */,
  3844.      XChar2b*    /* string */,
  3845.     int            /* nchars */,
  3846.     int*        /* direction_return */,
  3847.     int*        /* font_ascent_return */,
  3848.     int*        /* font_descent_return */,
  3849.     XCharStruct*    /* overall_return */
  3850. #endif
  3851. );
  3852.  
  3853. extern int XTextWidth(
  3854. #if NeedFunctionPrototypes
  3855.     XFontStruct*    /* font_struct */,
  3856.      char*    /* string */,
  3857.     int            /* count */
  3858. #endif
  3859. );
  3860.  
  3861. extern int XTextWidth16(
  3862. #if NeedFunctionPrototypes
  3863.     XFontStruct*    /* font_struct */,
  3864.      XChar2b*    /* string */,
  3865.     int            /* count */
  3866. #endif
  3867. );
  3868.  
  3869. extern Bool XTranslateCoordinates(
  3870. #if NeedFunctionPrototypes
  3871.     Display*        ,
  3872.     Window        ,
  3873.     Window        ,
  3874.     int            ,
  3875.     int            ,
  3876.     int*        ,
  3877.     int*        ,
  3878.     Window*        
  3879. #endif
  3880. );
  3881.  
  3882. extern XUndefineCursor(
  3883. #if NeedFunctionPrototypes
  3884.     Display*        /* display */,
  3885.     Window        /* w */
  3886. #endif
  3887. );
  3888.  
  3889. extern XUngrabButton(
  3890. #if NeedFunctionPrototypes
  3891.     Display*        /* display */,
  3892.     unsigned int    /* button */,
  3893.     unsigned int    /* modifiers */,
  3894.     Window        /* grab_window */
  3895. #endif
  3896. );
  3897.  
  3898. extern XUngrabKey(
  3899. #if NeedFunctionPrototypes
  3900.     Display*        /* display */,
  3901.     int            /* keycode */,
  3902.     unsigned int    /* modifiers */,
  3903.     Window        /* grab_window */
  3904. #endif
  3905. );
  3906.  
  3907. extern XUngrabKeyboard(
  3908. #if NeedFunctionPrototypes
  3909.     Display*        /* display */,
  3910.     Time        /* time */
  3911. #endif
  3912. );
  3913.  
  3914. extern XUngrabPointer(
  3915. #if NeedFunctionPrototypes
  3916.     Display*        /* display */,
  3917.     Time        /* time */
  3918. #endif
  3919. );
  3920.  
  3921. extern XUngrabServer(
  3922. #if NeedFunctionPrototypes
  3923.     Display*        /* display */
  3924. #endif
  3925. );
  3926.  
  3927. extern XUninstallColormap(
  3928. #if NeedFunctionPrototypes
  3929.     Display*        /* display */,
  3930.     Colormap        /* colormap */
  3931. #endif
  3932. );
  3933.  
  3934. extern XUnloadFont(
  3935. #if NeedFunctionPrototypes
  3936.     Display*        /* display */,
  3937.     Font        /* font */
  3938. #endif
  3939. );
  3940.  
  3941. extern XUnmapSubwindows(
  3942. #if NeedFunctionPrototypes
  3943.     Display*        /* display */,
  3944.     Window        /* w */
  3945. #endif
  3946. );
  3947.  
  3948. extern XUnmapWindow(
  3949. #if NeedFunctionPrototypes
  3950.     Display*        /* display */,
  3951.     Window        /* w */
  3952. #endif
  3953. );
  3954.  
  3955. extern int XVendorRelease(
  3956. #if NeedFunctionPrototypes
  3957.     Display*        /* display */
  3958. #endif
  3959. );
  3960.  
  3961. extern XWarpPointer(
  3962. #if NeedFunctionPrototypes
  3963.     Display*        /* display */,
  3964.     Window        /* src_w */,
  3965.     Window        /* dest_w */,
  3966.     int            /* src_x */,
  3967.     int            /* src_y */,
  3968.     unsigned int    /* src_width */,
  3969.     unsigned int    /* src_height */,
  3970.     int            /* dest_x */,
  3971.     int            /* dest_y */         
  3972. #endif
  3973. );
  3974.  
  3975. extern int XWidthMMOfScreen(
  3976. #if NeedFunctionPrototypes
  3977.     Screen*        /* screen */
  3978. #endif
  3979. );
  3980.  
  3981. extern int XWidthOfScreen(
  3982. #if NeedFunctionPrototypes
  3983.     Screen*        /* screen */
  3984. #endif
  3985. );
  3986.  
  3987. extern XWindowEvent(
  3988. #if NeedFunctionPrototypes
  3989.     Display*        /* display */,
  3990.     Window        /* w */,
  3991.     long        /* event_mask */,
  3992.     XEvent*        /* event_return */
  3993. #endif
  3994. );
  3995.  
  3996. extern int XWriteBitmapFile(
  3997. #if NeedFunctionPrototypes
  3998.     Display*        /* display */,
  3999.     char*    /* filename */,
  4000.     Pixmap        /* bitmap */,
  4001.     unsigned int    /* width */,
  4002.     unsigned int    /* height */,
  4003.     int            /* x_hot */,
  4004.     int            /* y_hot */             
  4005. #endif
  4006. );
  4007.  
  4008. extern Bool XSupportsLocale(
  4009. #if NeedFunctionPrototypes
  4010.     void
  4011. #endif
  4012. );
  4013.  
  4014. extern char *XSetLocaleModifiers(
  4015. #if NeedFunctionPrototypes
  4016.      char*    /* modifier_list */
  4017. #endif
  4018. );
  4019.  
  4020. extern XFontSet XCreateFontSet(
  4021. #if NeedFunctionPrototypes
  4022.     Display*        /* display */,
  4023.      char*    /* base_font_name_list */,
  4024.     char***        /* missing_charset_list */,
  4025.     int*        /* missing_charset_count */,
  4026.     char**        /* def_string */
  4027. #endif
  4028. );
  4029.  
  4030. extern void XFreeFontSet(
  4031. #if NeedFunctionPrototypes
  4032.     Display*        /* display */,
  4033.     XFontSet        /* font_set */
  4034. #endif
  4035. );
  4036.  
  4037. extern int XFontsOfFontSet(
  4038. #if NeedFunctionPrototypes
  4039.     XFontSet        /* font_set */,
  4040.     XFontStruct***    /* font_struct_list */,
  4041.     char***        /* font_name_list */
  4042. #endif
  4043. );
  4044.  
  4045. extern char *XBaseFontNameListOfFontSet(
  4046. #if NeedFunctionPrototypes
  4047.     XFontSet        /* font_set */
  4048. #endif
  4049. );
  4050.  
  4051. extern char *XLocaleOfFontSet(
  4052. #if NeedFunctionPrototypes
  4053.     XFontSet        /* font_set */
  4054. #endif
  4055. );
  4056.  
  4057. extern Bool XContextDependentDrawing(
  4058. #if NeedFunctionPrototypes
  4059.     XFontSet        /* font_set */
  4060. #endif
  4061. );
  4062.  
  4063. extern XFontSetExtents *XExtentsOfFontSet(
  4064. #if NeedFunctionPrototypes
  4065.     XFontSet        /* font_set */
  4066. #endif
  4067. );
  4068.  
  4069. extern int XmbTextEscapement(
  4070. #if NeedFunctionPrototypes
  4071.     XFontSet        /* font_set */,
  4072.      char*    /* text */,
  4073.     int            /* bytes_text */
  4074. #endif
  4075. );
  4076.  
  4077. extern int XwcTextEscapement(
  4078. #if NeedFunctionPrototypes
  4079.     XFontSet        /* font_set */,
  4080.     wchar_t*        /* text */,
  4081.     int            /* num_wchars */
  4082. #endif
  4083. );
  4084.  
  4085. extern int XmbTextExtents(
  4086. #if NeedFunctionPrototypes
  4087.     XFontSet        /* font_set */,
  4088.      char*    /* text */,
  4089.     int            /* bytes_text */,
  4090.     XRectangle*        /* overall_ink_return */,
  4091.     XRectangle*        /* overall_logical_return */
  4092. #endif
  4093. );
  4094.  
  4095. extern int XwcTextExtents(
  4096. #if NeedFunctionPrototypes
  4097.     XFontSet        /* font_set */,
  4098.     wchar_t*        /* text */,
  4099.     int            /* num_wchars */,
  4100.     XRectangle*        /* overall_ink_return */,
  4101.     XRectangle*        /* overall_logical_return */
  4102. #endif
  4103. );
  4104.  
  4105. extern Status XmbTextPerCharExtents(
  4106. #if NeedFunctionPrototypes
  4107.     XFontSet        /* font_set */,
  4108.      char*    /* text */,
  4109.     int            /* bytes_text */,
  4110.     XRectangle*        /* ink_extents_buffer */,
  4111.     XRectangle*        /* logical_extents_buffer */,
  4112.     int            /* buffer_size */,
  4113.     int*        /* num_chars */,
  4114.     XRectangle*        /* overall_ink_return */,
  4115.     XRectangle*        /* overall_logical_return */
  4116. #endif
  4117. );
  4118.  
  4119. extern Status XwcTextPerCharExtents(
  4120. #if NeedFunctionPrototypes
  4121.     XFontSet        /* font_set */,
  4122.     wchar_t*        /* text */,
  4123.     int            /* num_wchars */,
  4124.     XRectangle*        /* ink_extents_buffer */,
  4125.     XRectangle*        /* logical_extents_buffer */,
  4126.     int            /* buffer_size */,
  4127.     int*        /* num_chars */,
  4128.     XRectangle*        /* overall_ink_return */,
  4129.     XRectangle*        /* overall_logical_return */
  4130. #endif
  4131. );
  4132.  
  4133. extern void XmbDrawText(
  4134. #if NeedFunctionPrototypes
  4135.     Display*        /* display */,
  4136.     Drawable        /* d */,
  4137.     GC            /* gc */,
  4138.     int            /* x */,
  4139.     int            /* y */,
  4140.     XmbTextItem*    /* text_items */,
  4141.     int            /* nitems */
  4142. #endif
  4143. );
  4144.  
  4145. extern void XwcDrawText(
  4146. #if NeedFunctionPrototypes
  4147.     Display*        /* display */,
  4148.     Drawable        /* d */,
  4149.     GC            /* gc */,
  4150.     int            /* x */,
  4151.     int            /* y */,
  4152.     XwcTextItem*    /* text_items */,
  4153.     int            /* nitems */
  4154. #endif
  4155. );
  4156.  
  4157. extern void XmbDrawString(
  4158. #if NeedFunctionPrototypes
  4159.     Display*        /* display */,
  4160.     Drawable        /* d */,
  4161.     XFontSet        /* font_set */,
  4162.     GC            /* gc */,
  4163.     int            /* x */,
  4164.     int            /* y */,
  4165.      char*    /* text */,
  4166.     int            /* bytes_text */
  4167. #endif
  4168. );
  4169.  
  4170. extern void XwcDrawString(
  4171. #if NeedFunctionPrototypes
  4172.     Display*        /* display */,
  4173.     Drawable        /* d */,
  4174.     XFontSet        /* font_set */,
  4175.     GC            /* gc */,
  4176.     int            /* x */,
  4177.     int            /* y */,
  4178.     wchar_t*        /* text */,
  4179.     int            /* num_wchars */
  4180. #endif
  4181. );
  4182.  
  4183. extern void XmbDrawImageString(
  4184. #if NeedFunctionPrototypes
  4185.     Display*        /* display */,
  4186.     Drawable        /* d */,
  4187.     XFontSet        /* font_set */,
  4188.     GC            /* gc */,
  4189.     int            /* x */,
  4190.     int            /* y */,
  4191.      char*    /* text */,
  4192.     int            /* bytes_text */
  4193. #endif
  4194. );
  4195.  
  4196. extern void XwcDrawImageString(
  4197. #if NeedFunctionPrototypes
  4198.     Display*        /* display */,
  4199.     Drawable        /* d */,
  4200.     XFontSet        /* font_set */,
  4201.     GC            /* gc */,
  4202.     int            /* x */,
  4203.     int            /* y */,
  4204.     wchar_t*        /* text */,
  4205.     int            /* num_wchars */
  4206. #endif
  4207. );
  4208.  
  4209. extern XIM XOpenIM(
  4210. #if NeedFunctionPrototypes
  4211.     Display*            /* dpy */,
  4212.     struct _XrmHashBucketRec*    /* rdb */,
  4213.     char*            /* res_name */,
  4214.     char*            /* res_class */
  4215. #endif
  4216. );
  4217.  
  4218. extern Status XCloseIM(
  4219. #if NeedFunctionPrototypes
  4220.     XIM /* im */
  4221. #endif
  4222. );
  4223.  
  4224. extern char *XGetIMValues(
  4225. #if NeedVarargsPrototypes
  4226.     XIM /* im */, ...
  4227. #endif
  4228. );
  4229.  
  4230. extern Display *XDisplayOfIM(
  4231. #if NeedFunctionPrototypes
  4232.     XIM /* im */
  4233. #endif
  4234. );
  4235.  
  4236. extern char *XLocaleOfIM(
  4237. #if NeedFunctionPrototypes
  4238.     XIM /* im*/
  4239. #endif
  4240. );
  4241.  
  4242. extern XIC XCreateIC(
  4243. #if NeedVarargsPrototypes
  4244.     XIM /* im */, ...
  4245. #endif
  4246. );
  4247.  
  4248. extern void XDestroyIC(
  4249. #if NeedFunctionPrototypes
  4250.     XIC /* ic */
  4251. #endif
  4252. );
  4253.  
  4254. extern void XSetICFocus(
  4255. #if NeedFunctionPrototypes
  4256.     XIC /* ic */
  4257. #endif
  4258. );
  4259.  
  4260. extern void XUnsetICFocus(
  4261. #if NeedFunctionPrototypes
  4262.     XIC /* ic */
  4263. #endif
  4264. );
  4265.  
  4266. extern wchar_t *XwcResetIC(
  4267. #if NeedFunctionPrototypes
  4268.     XIC /* ic */
  4269. #endif
  4270. );
  4271.  
  4272. extern char *XmbResetIC(
  4273. #if NeedFunctionPrototypes
  4274.     XIC /* ic */
  4275. #endif
  4276. );
  4277.  
  4278. extern char *XSetICValues(
  4279. #if NeedVarargsPrototypes
  4280.     XIC /* ic */, ...
  4281. #endif
  4282. );
  4283.  
  4284. extern char *XGetICValues(
  4285. #if NeedVarargsPrototypes
  4286.     XIC /* ic */, ...
  4287. #endif
  4288. );
  4289.  
  4290. extern XIM XIMOfIC(
  4291. #if NeedFunctionPrototypes
  4292.     XIC /* ic */
  4293. #endif
  4294. );
  4295.  
  4296. extern Bool XFilterEvent(
  4297. #if NeedFunctionPrototypes
  4298.     XEvent*    /* event */,
  4299.     Window    /* window */
  4300. #endif
  4301. );
  4302.  
  4303. extern int XmbLookupString(
  4304. #if NeedFunctionPrototypes
  4305.     XIC            /* ic */,
  4306.     XKeyPressedEvent*    /* event */,
  4307.     char*        /* buffer_return */,
  4308.     int            /* bytes_buffer */,
  4309.     KeySym*        /* keysym_return */,
  4310.     Status*        /* status_return */
  4311. #endif
  4312. );
  4313.  
  4314. extern int XwcLookupString(
  4315. #if NeedFunctionPrototypes
  4316.     XIC            /* ic */,
  4317.     XKeyPressedEvent*    /* event */,
  4318.     wchar_t*        /* buffer_return */,
  4319.     int            /* wchars_buffer */,
  4320.     KeySym*        /* keysym_return */,
  4321.     Status*        /* status_return */
  4322. #endif
  4323. );
  4324.  
  4325. extern XVaNestedList XVaCreateNestedList(
  4326. #if NeedVarargsPrototypes
  4327.     int /*unused*/, ...
  4328. #endif
  4329. );
  4330. #endif
  4331. _XFUNCPROTOEND
  4332.  
  4333.  
  4334. /*
  4335. #ifndef MAKELIBRARY
  4336. #include <X11/X11_pragmas.h>
  4337. #include <X11/Xt_pragmas.h>
  4338. #endif
  4339. */
  4340.  
  4341. #include "amigax:amigax_proto.h"
  4342.  
  4343. #include "unix.h"
  4344.  
  4345. #endif /* _XLIB_H_ */
  4346.